Commit Graph

14251 Commits

Author SHA1 Message Date
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
Marcel Holtmann
ddcc0659fd core: Rename a few functions and parameters 2013-01-18 17:27:58 -08:00
Marcel Holtmann
756dc8fba5 core: Remove unused got_reply session variable 2013-01-18 17:21:57 -08:00
Luiz Augusto von Dentz
5dcfbe2154 AVRCP: Fix rejecting RegisterNotification if no transport exists
If no transport exists set the volume as 0, the real volume will be set
when a transport becomes available.
2013-01-18 16:37:53 +02:00
Szymon Janc
79fa8ef2d1 core: Add workaround for device pairing kernel bug
Some kernels reply to device pairing command with bogus command status
instead of command complete event if adapter was not powered.

Command status event doesn't provide remote device address and type
needed to properly complete bonding request.

Pass possibly missing data as user_data to mgmt_send and use it in
pair_device_complete function if needed.
2013-01-18 15:31:03 +02:00
Johan Hedberg
8e9880bfa9 tools: Add basic invalid params test case for mgmt_unblock_device 2013-01-18 15:15:34 +02:00
Johan Hedberg
fba961187f tools: Add basic invalid params test case for mgmt_block_device 2013-01-18 15:14:31 +02:00
Johan Hedberg
f3a2159bdd tools: Add basic mgmt_disconnect invalid params test case 2013-01-18 15:01:48 +02:00