Johan Hedberg
b01bc4c867
core: Only set EIR data pointer after confirming it points to valid memory
...
Even though we do not access the memory it's still safer not to have any
pointers to it until we know it's valid.
2013-01-22 15:48:36 +02:00
Johan Hedberg
252222a414
monitor: Add support for passkey notify mgmt events
2013-01-22 15:39:55 +02:00
Johan Hedberg
cdc215e1b4
core: Fix canceling pairing through mgmt
...
The mgmt_reply() function should be used instead of mgmt_send() since
otherwise the request obeys the usual command queuing which wont work
due to the pending mgmt_pair_device command.
2013-01-22 14:57:18 +02:00
Johan Hedberg
f46bba7faa
tools: Add mgmt_cancel_pair_device support to btmgmt
2013-01-22 14:52:04 +02:00
Syam Sidhardhan
e755bd90d2
a2dp: Fix invalid memory access during abort_ind()
...
There is an invalid memory access w.r.t to the callback
during the Abort_Ind finalize_setup_errno().
We should terminate the variable arguments with NULL.
Log:
bluetoothd[3353]: audio/avdtp.c:avdtp_parse_cmd() Received ABORT_CMD
bluetoothd[3353]: audio/a2dp.c:abort_ind() Source 0xb6f5ecc8: Abort_Ind
bluetoothd[3353]: audio/a2dp.c:setup_ref() 0xb6f63200: ref=2
bluetoothd[3353]: audio/transport.c:media_transport_remove() Transport
/org/bluez/3353/hci0/dev_BC_47_60_F5_88_89/fd1 Owner :1.0
bluetoothd[3353]: audio/transport.c:media_transport_release() Transport
/org/bluez/3353/hci0/dev_BC_47_60_F5_88_89/fd1: read lock released
bluetoothd[3353]: audio/transport.c:media_transport_release() Transport
/org/bluez/3353/hci0/dev_BC_47_60_F5_88_89/fd1: write lock released
bluetoothd[3353]: audio/transport.c:media_request_reply() Request
Acquire Reply Input/output error
bluetoothd[3353]: audio/transport.c:media_owner_free() Owner :1.0
bluetoothd[3353]: audio/transport.c:media_owner_remove() Owner :1.0 Request Acquire
bluetoothd[3353]: audio/a2dp.c:a2dp_sep_unlock() SEP 0xb6f5ecc8 unlocked
bluetoothd[3353]: audio/a2dp.c:setup_unref() 0xb6f63200: ref=1
[sys_assert]START of sighandler
[sys-assert]exepath = bluetoothd
[sys-assert]processname = bluetoothd
[sys_assert]this thread is main thread. pid=3353
[sys-assert]cs timestr 1358524835
bluetoothd[3353]: crashed [1358524835] processname=bluetoothd, pid=3353, tid=3353, signal=11
[sys-assert]start print_node_to_file
sighandler = 0xb6e8cfc9, g_sig_oldact[i] = (nil)
[sys_assert]END of sighandler
Segmentation fault (core dumped)
2013-01-22 13:30:30 +02:00
Syam Sidhardhan
cb377fa61d
a2dp: Fix invalid memory access during suspend_ind()
...
There is a possible invalid memory access during suspend_ind().
We should terminate the variable arguments with NULL.
2013-01-22 13:30:30 +02:00
Syam Sidhardhan
3021f18098
health: Fix possible use after free
...
A pointer to freed memory is dereferenced if we call function
hdp_get_dcpsm_cb() with out any earlier reference.
2013-01-22 13:30:30 +02:00
Johan Hedberg
da5596731b
core: Fix mgmt_get_connections response size checking
...
Each address entry is of the size mgmt_addr_info and not bdaddr_t.
2013-01-22 13:18:32 +02:00
Marcel Holtmann
4dbe677ad2
monitor: Use explicit filter policy strings for LE create connection
2013-01-22 02:09:16 -08:00
Marcel Holtmann
180899b102
monitor: Decode LE filter policy for all cases
2013-01-22 01:51:02 -08:00
Szymon Janc
781f3cde67
monitor: Fix possible crash on unknown command
...
If unknown command is received monitor would crash due to dereference
of NULL opcode_data pointer.
2013-01-21 11:38:17 -08:00
Alexandros Antonopoulos
1f3d21d46f
core: Fix crash when an invalid uuid is passed to Device1.DisconnectProfile
...
If the user calls Device1.DisconnectProfile with an invalid profile
uuid disconnect_profile still tries to parse the uuid resulting in
a SIGSEGV
2013-01-21 17:58:54 +02:00
Alexandros Antonopoulos
d42cbe8580
avctp: Fix size of read() for browsing channel callbacks
...
The read() function should attempt to read browsing->imtu bytes
and not sizeof(browsing->imtu).
2013-01-21 17:53:19 +02:00
Alexandros Antonopoulos
d23fb32b8e
avctp: Fix request timeout after a channel is destroyed
...
When the control channel is destroyed if there is a pending request
(chan->p) then the channel queue is deleted in avctp_channel_destroy
but the timer is still alive resulting in a SIGSEGV
2013-01-21 17:53:18 +02:00
Alexandros Antonopoulos
879efa424a
avctp: Fix avctp_unregister_browsing_pdu_handler inner loop
...
Inner loop should access the sessions data and not the servers
data
2013-01-21 17:53:18 +02:00
Luiz Augusto von Dentz
feccaf0498
player: Fix not returning current position properly
...
Current position should be returned for Get/GetAll not last position
notified otherwise clients that are started after playback are
not able to synchronize its position properly as it does no know how
for how long the playback has advanced.
2013-01-21 14:55:36 +02:00
Marcel Holtmann
f426775b84
shared: Remove also queued requests and replies for index cancel
2013-01-20 20:12:07 -08:00
Marcel Holtmann
ab0ff42d43
shared: Fix issue with management destroy handling
2013-01-20 19:10:23 -08:00
Marcel Holtmann
65214a997e
core: Remove pointless GFunc casts from device handling
2013-01-20 18:54:33 -08:00
Marcel Holtmann
a3d31b58d2
shared: Mark and skip notification callbacks when become invalid
2013-01-20 18:45:03 -08:00
Marcel Holtmann
e3c028a44d
shared: Remove all pending requests for the specified index
2013-01-20 18:36:10 -08:00
Marcel Holtmann
c229ba89a1
gdbus: Check for valid path before handling properties
2013-01-20 18:25:12 -08:00
Marcel Holtmann
b63458353e
core: Don't take device reference for connection requests
...
The device reference is not needed since the adapter handling actually
owns the device object anyway. So do not bother taking another reference.
In addition actually remove the devices from the list when the adapter
is removed. Otherwise they stay around and just causes problems.
2013-01-20 16:14:32 -08:00
Marcel Holtmann
338efa13d4
core: Keep the DBusConnection around for device handling
...
It is required to have the connection around so device objects can
be deregistered. This happens triggered from the adapter handling.
2013-01-20 16:13:31 -08:00
Marcel Holtmann
f1e7f81efe
core: Use same reference counting as adapter handling
2013-01-20 16:13:05 -08:00
Marcel Holtmann
8332abd8fe
core: Remove pointless protection for device path at unregister
...
If such a protection is really needed, then it might should be better
handled properly within GDBus. So remove it and if it causes an issue,
fix it then.
2013-01-20 15:31:17 -08:00
Marcel Holtmann
a399286dc5
core: Use a global DBusConnection variable
2013-01-20 15:29:50 -08:00
Marcel Holtmann
2e89402a25
core: Add device init and cleanup functions
2013-01-20 15:21:08 -08:00
Marcel Holtmann
9390708d29
core: Add some extra debugs for device creation
2013-01-20 15:15:29 -08:00
Marcel Holtmann
f710762d3f
core: Make the default UUID search list const
2013-01-20 15:15:14 -08:00
Marcel Holtmann
70c733459f
monitor: Add support for decoding LE white list commands
2013-01-20 10:09:31 -08:00
Marcel Holtmann
6fe39e7f9f
monitor: Add support for decoding LE features
2013-01-20 09:52:06 -08:00
Marcel Holtmann
27383772dd
monitor: Add support for decoding LE event mask
2013-01-20 09:43:15 -08:00
Marcel Holtmann
fd303a4ef1
monitor: Add support for decoding LE supported states
2013-01-20 09:35:49 -08:00
Marcel Holtmann
cdb2fd58d3
core: Provide skeleton for LE connection trigger
2013-01-20 01:02:31 -08:00
Marcel Holtmann
dee5bc60cb
core: Handle invalidated RSSI signals a bit better
2013-01-20 01:01:27 -08:00
Marcel Holtmann
3f3152f15e
core: Avoid massive signals for changes below 8 dBm
...
Instead of blasting clients with RSSI changed signals, slow this down
a little bit and only report changes of 8 dBm and more.
2013-01-20 00:33:03 -08:00
Marcel Holtmann
f179ff75b7
core: Allow passive scanning to update existing devices
...
During the passive scan, do not create new devices or update temporary
ones. However update of existing paired devices is desired.
2013-01-20 00:09:19 -08:00
Marcel Holtmann
99d34b8ceb
core: Check for LE controller before cancelling passive scanning
2013-01-19 23:48:59 -08:00
Marcel Holtmann
3f2d53c64e
core: Avoid pointless casting of GCompareFunc for compare functions
2013-01-19 23:42:28 -08:00
Marcel Holtmann
bf7446cbcf
core: Use delay between passive scanning iterations
...
Keeping the conroller active for passive scanning with the current
kernel interface seems inefficient since it automatically disables
the discovery procedure. So instead of restarting it right away,
introduce a small delay to give the controller more chances to sleep.
2013-01-19 23:18:45 -08:00
Marcel Holtmann
c16853b3fd
core: Add support for triggering passive scanning
...
This is the first step for passive scanning support. Create triggers
at various location to allow entering passive scanning.
2013-01-19 20:58:01 -08:00
Marcel Holtmann
f0ccb6d471
core: Handle existing start discovery gracefully
...
In case a discovery already exists, keep using it if is has the same
type and only if not, stop it and start a new one.
2013-01-19 19:13:49 -08:00
Marcel Holtmann
7b897d2d38
core: Simplify discovery start and stop handling
...
To make the discovery start, stop and restart logic even simple, just
trigger start of discovery when client gets registered. It is almost
impossible to handle all corner cases, so just trigger another restart
of the discovery with a larger timeout in case of an error.
2013-01-19 18:41:08 -08:00
Marcel Holtmann
407579a962
core: Fix multiple issues with discovery handling
...
This patch is the first attempt in fixing the discovery issues for
dual-mode BR/EDR + LE controllers. It creates a clean chain for
start/stop discovery client handling and also for the internal
handling of suspend, resume and restart.
However this patch removes the LE connection handling. And that needs
to be put back with a separate patch.
2013-01-19 16:01:45 -08:00
Szymon Janc
bbf2080f64
tools: Use proper test data in mgmt_unblock_device test
...
Copy and paste error. Although both data values are same use proper
one for clarity.
2013-01-19 09:55:39 +02:00
Marcel Holtmann
d1c281d89a
core: Use discovery found list instead of nested struct
2013-01-18 21:00:38 -08:00
Marcel Holtmann
a97fef5405
core: Remove pending_mode session variable
2013-01-18 20:49:58 -08:00
Marcel Holtmann
dde1b9580e
core: Remove unneeded session reference counting
2013-01-18 17:36:33 -08:00
Marcel Holtmann
5e4f1b8da3
core: Remove session_req_type variable and parameter
2013-01-18 17:31:07 -08:00