Commit Graph

15204 Commits

Author SHA1 Message Date
Luiz Augusto von Dentz
ee5df16263 audio/AVCTP: Remove dependency on struct audio_device
This is part of the work necessary to completely remove
struct audio_device
2013-07-12 15:05:45 +03:00
Luiz Augusto von Dentz
cf43fae8a4 audio/control: Reduce dependency on struct audio_device
This is part of the work necessary to completely remove
struct audio_device
2013-07-12 15:05:45 +03:00
Luiz Augusto von Dentz
bbea4622bf audio/source: Reduce dependency on struct audio_device
This is part of the work necessary to completely remove
struct audio_device
2013-07-12 15:05:44 +03:00
Luiz Augusto von Dentz
d3e907f591 audio/sink: Reduce dependency on struct audio_device
This is part of the work necessary to completely remove
struct audio_device
2013-07-12 15:05:44 +03:00
Luiz Augusto von Dentz
98ce03bb8f audio/control: Use service user_data for private data
This remove the need of forward declaration of struct control and prepare
for a complete removal of struct audio_device.
2013-07-12 15:05:44 +03:00
Luiz Augusto von Dentz
db7a1b8750 audio/source: Use service user_data for private data
This remove the need of forward declaration of struct source and prepare
for a complete removal of struct audio_device.
2013-07-12 15:05:43 +03:00
Luiz Augusto von Dentz
d109aa985d audio/sink: Use service user_data for private data
This remove the need of forward declaration of struct sink and prepare
for a complete removal of struct audio_device.
2013-07-12 15:05:43 +03:00
Johan Hedberg
5904683256 core: Clear temporary flag only when a real profile is connected 2013-07-12 14:04:58 +03:00
Johan Hedberg
1549e0a614 input: Fix rejecting connections from unknown devices 2013-07-12 14:04:05 +03:00
Johan Hedberg
3bdc3d0f00 core: Fix incorrect update of dev->svc_refreshed 2013-07-12 13:18:14 +03:00
Johan Hedberg
a70ad3e32d input: Fix service disconnected state transition
Without this patch the input service would remain in connected state
whenever a remotely initiated disconnection happens.
2013-07-12 12:50:45 +03:00
Johan Hedberg
0691f7f30e core: Remove unnecessary device_resolve_svc function 2013-07-12 12:28:57 +03:00
Johan Hedberg
0c575e46ec input: Add some extra debug statements to clarify connection flow 2013-07-12 12:26:54 +03:00
Johan Hedberg
e08774af7a core: Fix returning correct D-Bus reply when refreshing services 2013-07-12 11:14:44 +03:00
Johan Hedberg
e23dd0d9f0 core: Clear device->attrib pointer before calling g_attrib_cancel_all
The g_attrib_cancel_all function may call functions such as
find_included_cb that should at this point no longer have access to the
GAttrib instance and try to do operations with it. Therefore it is
safest to ensure that device->attrib is no longer available in these
functions.
2013-07-12 10:43:25 +03:00
Frederic Danis
06ade160b2 core: Remove redundant includes from sdpd-*.c 2013-07-12 09:55:29 +03:00
Johan Hedberg
4b5caaf501 core: Refresh SDP services if no matching profiles were found 2013-07-11 14:46:38 +03:00
Johan Hedberg
75cacde961 core: Simplify code flow in search_cb 2013-07-11 11:42:54 +03:00
Johan Hedberg
82f769e033 core: Implement passive SDP discovery after connecting known services 2013-07-11 11:38:44 +03:00
Johan Hedberg
239d3076ff core: Remove unnecessary secure paramter from device_browse_primary 2013-07-11 11:30:55 +03:00
Johan Hedberg
c63e4609cc core: Remove unused reverse parameter from device_browse_sdp 2013-07-11 11:29:03 +03:00
Johan Hedberg
f72e4a40a2 core: Set low priority for SDP data
In the case that there are other channels over the same ACL we want SDP
transactions to interfere as little as possible.
2013-07-11 11:26:23 +03:00
Johan Hedberg
e339d0b6e5 core: Use g_dbus_send_reply over dbus_message_new_method_return 2013-07-10 14:45:34 +03:00
Johan Hedberg
ee25688e0a core: Remove profile removal detection
This code has been nonfunctional since 5.0 and it seems no-one cares for
it, so just remove it.
2013-07-10 14:37:08 +03:00
Johan Hedberg
e8353af327 core: Fix incorrectly restarting service discovery after pairing
If services are already discovered through a Device1.Connect() call we
should not retry discovering them when Device1.Pair() is called.
2013-07-10 13:56:12 +03:00
Luiz Augusto von Dentz
5da7617e7f core/device: Don't call btd_service_disconnect on device_remove
device_remove is called to cleanup/free the device objects so the
services should be disconnected before hand.
2013-07-10 12:55:14 +03:00
Luiz Augusto von Dentz
e726230d3b core/device: Fix crash while freeing services list
btd_service do alter its state on service_remove which can cause
plugins to attempt to access services list which may have freed some
services already.

To fix this the code now updates the list in place so the services are
first removed from services list before calling service_remove.
2013-07-10 12:55:14 +03:00
Luiz Augusto von Dentz
b72673c608 core/service: Rename service_shutdown to service_remove
This rename service_shutdown to service_remove to make it more similar to
other internal APIs such as device_remove which only do object
cleanup/free and do not have any disconnect logic.
2013-07-10 12:55:14 +03:00
Szymon Janc
a727297039 lib: Add range check for SDP_SVC_ATTR_RSP/SDP_SVC_SEARCH_ATTR_RSP
This is an improved version of recently reverted commit 1796f00e84.
Response size is verified against minimal allowed value only if it is
complete response. If response is partial it is allowed by spec that
it will be split in arbitrary manner.

Verified against Nokia BH217 on which original commit caused
regression.
2013-07-10 12:36:34 +03:00
Martin
ae672c6f3e obexd/client: Add Target property to Session interface
Target property is already documented property but it was not
implemented.
2013-07-08 18:48:53 +03:00
Luiz Augusto von Dentz
5e8b5ce9fc audio/source: Fix not notifying service about connection state
btd_service_connecting_complete should be called whenever the service
is connected otherwise the service state will not be consistent.
2013-07-05 13:19:48 +03:00
Luiz Augusto von Dentz
745a7e2b0c audio/sink: Fix not notifying service about connection state
btd_service_connecting_complete should be called whenever the service
is connected otherwise the service state will not be consistent.
2013-07-05 13:19:34 +03:00
Jefferson Delfes
328231416b emulator: Implement LE advertising report
When a virtual device starts a LE advertising, emulator searches for
other virtual devices that are in scan mode, in order to send adv data
to these devices.
Inverse goes when LE scan is enabled. Emulator searches virtual devices
that are in advertising mode and copy adv data to them.
2013-07-05 11:56:48 +03:00
Jefferson Delfes
2aab109f42 emulator: Dummy LE set advertising parameters
Implement basic LE set adv parameters command.
2013-07-05 11:56:25 +03:00
Jefferson Delfes
8d3386453a emulator: Disallow LE set scan params command when scan is enabled
When LE scan is enabled, the command LE set scan parameters should
return a command disallowed in status of command complete event.
2013-07-05 11:56:13 +03:00
Jefferson Delfes
5616bb9686 emulator: Store LE scan state of virtual controller
The LE command set scan enable can change the scan state of virtual
controller.
2013-07-05 11:55:57 +03:00
Jefferson Delfes
ba6460907a emulator: Implement basic LE set adv enable command
Store advertising state of virtual controller in btdev struct.
2013-07-05 11:55:33 +03:00
Jefferson Delfes
f1877f83b2 emulator: Store LE advertising data length in btdev
LE advertising data length will be used for emulating reports in other
virtual devices.
2013-07-05 11:55:09 +03:00
Christian Fetzer
831221dc5b obexd: Re-add D-Bus session properties
This got lost when switching to org.freedesktop.DBus.Properties.
2013-06-30 22:11:54 +03:00
Marcel Holtmann
ce04a4c18d monitor: Print UUID-32 and UUID-128 strings 2013-06-28 12:07:20 -07:00
Marcel Holtmann
18e70719ec monitor: Add stub for UUID-128 to string conversion 2013-06-28 12:06:06 -07:00
Marcel Holtmann
78a6366af4 Release 5.7 2013-06-26 10:10:50 -07:00
Marcel Holtmann
7aca3faac6 build: Update library version 2013-06-26 10:03:17 -07:00
Luiz Augusto von Dentz
6132e6eee0 obexd/MAP: Fix assigning pointer not value to 0
The fix introduced by 455fb131f0 would
leave err value uninitialized and set the pointer to 0 which doesn't
make any sense.
2013-06-26 16:19:30 +03:00
Johan Hedberg
c71e098d2e lib: Update company identifiers 2013-06-26 14:30:11 +03:00
Luiz Augusto von Dentz
c6b9a502a0 audio/player: Fix crash when current item UID is set to 0
Apparently some stacks set the current UID to 0 when paused/stopped
which causes the following:

bluetoothd[23185]: profiles/audio/player.c:media_player_set_playlist_item() 0
bluetoothd[23185]: profiles/audio/player.c:media_folder_create_item() (null) type audio uid 0
process 23185: arguments to dbus_message_iter_append_basic() were incorrect, assertion "_dbus_check_is_valid_path (*string_p)" failed in file dbus-message.c line 2531.
This is normally a bug in some application using the D-Bus library.
  D-Bus not built with -rdynamic so unable to print a backtrace

UID 0 is not a valid UID according to the spec so the code should not
attempt to create any object to represent it.
2013-06-26 13:40:09 +03:00
Johan Hedberg
550dab5ce2 Revert "lib: Add range check for SDP_SVC_ATTR_RSP/SDP_SVC_SEARCH_ATTR_RSP"
This reverts commit 1796f00e84.

This patch causes a regression with the Nokia BH217 headset. A correct
patch must take into account fragmented responses.
2013-06-25 21:44:17 +03:00
Luiz Augusto von Dentz
8dbf886484 core: Fix not adding UUID found during pairing
This is a regression introduce by de63199f0c
where the list of UUID found is always empty thus causing no driver to be
probed.
2013-06-25 19:53:16 +03:00
Luiz Augusto von Dentz
455fb131f0 obexd/MAP: Fix crash when receiving an event report
Conditional jump or move depends on uninitialised value(s)
   at 0x42C1AF: obex_put_stream_start (obex.c:869)
   by 0x428D1A: mns_put (mns.c:148)
   by 0x42B521: cmd_put (obex.c:982)
   by 0x419FB5: incoming_data (gobex.c:1022)
   by 0x3F31A47A54: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.3400.2)
   by 0x3F31A47D87: ??? (in /usr/lib64/libglib-2.0.so.0.3400.2)
   by 0x3F31A48181: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.3400.2)
   by 0x40DEE2: main (main.c:319)
 Uninitialised value was created by a stack allocation
   at 0x42C160: obex_put_stream_start (obex.c:862)
2013-06-25 16:44:57 +03:00
Christian Fetzer
c743b7830a obexd: Notify registered notification handlers in MNS 2013-06-25 16:12:47 +03:00