Commit Graph

9613 Commits

Author SHA1 Message Date
Syam Sidhardhan
3e14a20905 doc: Fix typo 2012-04-13 12:45:10 +03:00
Syam Sidhardhan
6b99a19da8 src: Fix newline before EOF 2012-04-13 12:45:00 +03:00
Syam Sidhardhan
4d4e83d8f0 input: Fix newline before EOF 2012-04-13 12:44:53 +03:00
Syam Sidhardhan
985966df29 audio: Fix newline before EOF 2012-04-13 12:44:42 +03:00
Syam Sidhardhan
ea22520461 network: Remove header declared but not defined 2012-04-13 12:44:33 +03:00
Syam Sidhardhan
2740c1abd0 headset: Remove header declared but not defined 2012-04-13 12:44:24 +03:00
Syam Sidhardhan
39db03053e adapter: Remove headers declared but not defined 2012-04-13 12:44:06 +03:00
Syam Sidhardhan
b254175fd3 sap-u8500: Fix empty parameter list in function declaration 2012-04-13 12:43:56 +03:00
Syam Sidhardhan
deea134fba sdpd-request: Fix passing zero instead of NULL 2012-04-13 12:43:45 +03:00
Syam Sidhardhan
822285d9ce agent: Fix double D-Bus message unref
Inside the g_dbus_send_message() we are already doing the
D-BUS message unref.
2012-04-13 12:43:24 +03:00
Syam Sidhardhan
ab8a7ebc91 gateway: Fix D-Bus reply memory leak
Re-arrange the code to avoid the D-Bus memory leak. Earlier if rfcomm
is not connected, then there was a reply memory leak.
2012-04-13 12:38:16 +03:00
Syam Sidhardhan
8151afd395 gateway: Fix D-Bus memory leak in audio 2012-04-13 12:37:11 +03:00
Syam Sidhardhan
9ec213277b gstavdtpsink: Fix D-Bus memory leak in audio 2012-04-13 12:36:41 +03:00
Syam Sidhardhan
f9b4a114e5 agent: Free the agent request properly
In the case of error, Unref the req->msg which is allocated inside the
pincode_request_new()
2012-04-13 12:36:31 +03:00
Syam Sidhardhan
7240dc63d3 avrcp: Fix the response ctype of SetPlayerApplicationSettingValue
Request ctype of "SetPlayerApplicationSettingValue" is CONTROL,
so response should be ACCEPTED instead of STABLE.
2012-04-13 12:36:20 +03:00
Syam Sidhardhan
d96457e1a4 health: Fix memory leak 2012-04-13 12:35:51 +03:00
Michal Labedzki
4292c980d3 AVRCP: Add missing capability for TrackReachedEnd
Add missing capability for TrackReachedEnd.
2012-04-12 14:46:39 +03:00
Anderson Lizardo
cb40056ccd audio: Fix memory leak when headset server probe() fails
If RFCOMM is disabled on the kernel, headset_server_probe() fails.
Relevant log messages:

 audio/manager.c:headset_server_probe() path /org/bluez/499/hci0
 src/adapter.c:btd_adapter_ref() 0x4bb4f78: ref=6
 audio/manager.c:audio_adapter_ref() 0x4ca3010: ref=1
 socket(STREAM, RFCOMM): Protocol not supported (93)
 audio/manager.c:audio_adapter_unref() 0x4ca3010: ref=0
 src/adapter.c:btd_adapter_unref() 0x4bb4f78: ref=5
 audio-headset: Operation not permitted (1)

The powered callback should only be registered if adapter driver probe
was successful. The callback unregister was moved to the beginning of
headset_server_remove() for consistency.

This fixes this memory leak:

==499== 8 bytes in 1 blocks are definitely lost in loss record 44 of 182
==499==    at 0x4826444: malloc (vg_replace_malloc.c:263)
==499==    by 0x4877243: g_malloc (gmem.c:132)
==499==    by 0x488D088: g_slice_alloc (gslice.c:836)
==499==    by 0x488E8A5: g_slist_append (gslist.c:230)
==499==    by 0x18AEEE: btd_adapter_register_powered_callback
(adapter.c:3416)
==499==    by 0x11AF61: headset_server_probe (manager.c:919)
==499==    by 0x18B67B: probe_driver (adapter.c:2033)
==499==    by 0x1908F5: adapter_init (adapter.c:2048)
==499==    by 0x189D20: btd_manager_register_adapter (manager.c:397)
==499==    by 0x1649AF: mgmt_cmd_complete (mgmtops.c:1075)
==499==    by 0x16665E: mgmt_event (mgmtops.c:1780)
==499==    by 0x48B2EFA: g_io_unix_dispatch (giounix.c:162)
2012-04-12 14:36:34 +03:00
Scott James Remnant
7216b7e967 simple-agent: add DisplayPinCode 2012-04-12 14:10:53 +03:00
Scott James Remnant
c8207bce01 doc: document DisplayPinCode 2012-04-12 14:10:50 +03:00
Scott James Remnant
a3b3fc4002 Display PIN generated by plugin
If a plugin pincode callback sets the display parameter to TRUE, send
the generated PIN to the agent for display using the new DisplayPinCode
agent method, including its fallback to RequestPinCode.
2012-04-12 14:10:42 +03:00
Scott James Remnant
431a235209 Add display parameter to plugin pincode callback
Pass a display parameter to the plugin pincode callback, a plugin
may set this to TRUE to indicate the PIN it generates should be
displayed on the screen for entry into the remote device.
2012-04-12 14:10:07 +03:00
Scott James Remnant
ddfe9fccbf Add AUTH_TYPE_NOTIFY_PASSKEY to device_request_authentication
This new authentication type accepts a pincode and calls the
DisplayPinCode agent method, a fallback is provided so that if the
method is not implemented the older RequestPinCode method is used
instead.

Due to this fallback, the agent_pincode_cb is used and calling
functions should send the pincode passed to the callback to the
adapter, which may differ from that generated.
2012-04-12 14:09:27 +03:00
Scott James Remnant
32a92a9b5a agent: add DisplayPinCode method
In constrast to DisplayPasskey, this sends a UTF-8 string PIN code
to the agent; also we support a callback for the case where the
Agent doesn't implement this new method so we can fallback.
2012-04-12 14:07:34 +03:00
Scott James Remnant
9bb3d64263 Pass passkey by pointer rather than by value
This allows alternate data of a different type to be passed to
device_request_authentication() for other notification types such
as those that require a PIN.
2012-04-12 14:04:59 +03:00
Scott James Remnant
0a054d5cba Rename AUTH_TYPE_NOTIFY to AUTH_TYPE_NOTIFY_PASSKEY
This makes room for additional notification types to be added.
2012-04-12 14:03:33 +03:00
Claudio Takahasi
8e8d1e4df9 fakehid: Remove define not referenced 2012-04-12 13:14:06 +03:00
Claudio Takahasi
56426d2e98 fakehid: Remove unneeded header includes 2012-04-12 13:13:59 +03:00
Hemant Gupta
1a56e362e4 mgmtops: Handle Start Discovery Complete in case of failure
This patch adds handling of start discovery complete event in cases
when discovery fails to get started.
2012-04-10 13:28:05 +03:00
Gustavo Padovan
d22d083d6d mgmt: update mgmt control channel id
kernel side has updated its control channel id from 1 to 3.
2012-04-05 22:30:31 +03:00
Szymon Janc
7fa6685d05 DeviceInfo: Fix compilation with old glib
Add missing include glib-compat.h to deviceinfo.c. deviceinfo_free
is using g_slist_free_full() which is not available in old glib
resulting in compilation error.

deviceinfo/deviceinfo.c: In function ‘deviceinfo_free’:
deviceinfo/deviceinfo.c:66: error: implicit declaration of function ‘g_slist_free_full’
2012-04-05 13:15:21 +03:00
Joohi Rastogi
91baac990d AVRCP: Fix response length for Subunit Info command
This affect PTS Test Case TC_TG_ICC_BV_02_I
2012-04-05 12:52:27 +03:00
Joohi Rastogi
2d392db690 AVRCP: Fix response length for Unit Info command
This affect PTS Test Case TC_TG_ICC_BV_01_I
2012-04-05 12:52:18 +03:00
Chen Ganir
d9ac7bbf97 DeviceInfo: Read PNP ID
Read the PNP ID characteristic of the DeviceInfo Service, and
store it inside the btd_device, for use by other profiles.
2012-04-04 15:03:16 +03:00
Chen Ganir
5fb7e25988 DeviceInfo: Discover Characteristics
Add logic to discover all characteristics and build a
characteristic list.
2012-04-04 15:01:25 +03:00
Chen Ganir
f7610d058c DeviceInfo: Add connection logic
Add connection logic to the Device Information Plugin. When the
driver is loaded, it will request a connection to the remote device
and release the connection request when destroyed.
2012-04-04 15:01:14 +03:00
Chen Ganir
620ac8c7c2 Add DeviceInformation GATT Client
Add the DeviceInformation GATT Client plugin skeleton.
2012-04-04 14:59:58 +03:00
Rafael Fonseca
70d7ee146b Fix spelling errors
Fix spelling errors found using the codespell tool
(https://github.com/lucasdemarchi/codespell).
2012-04-04 13:03:54 +03:00
Hemant Gupta
7c824c9b7a Adapter: Fix Discovering state while Powering Off
This patch fixes the adapter discovering state while powering off.
Without this fix, BlueZ sends incorrect discovering state to upper
layers while switching off.
2012-04-04 13:02:39 +03:00
Anderson Lizardo
098de49acf attrib: Fix D-Bus service disconnect watch removal
watcher_free() will be automatically called when removing the D-Bus
watch (it was set as the destroy callback when adding the watch),
therefore it is only necessary to remove the watch.
2012-04-04 13:00:14 +03:00
Anderson Lizardo
371e9dfbe9 thermometer: Fix D-Bus service disconnect watch removal
destroy_watcher() will be automatically called when removing the D-Bus
watch (it was set as the destroy callback when adding the watch),
therefore it is only necessary to remove the watch.
2012-04-04 13:00:03 +03:00
Anderson Lizardo
c4494591c9 gdbus: Use destroy callback for service watch
Even though service watches accepted a "destroy" callback, they were
being ignored. This fix properly pass them along so they are called when
the watch is removed.
2012-04-04 12:56:51 +03:00
Anderson Lizardo
0779dd9b3b attrib: Fix "make distcheck" build
Any new header files (att-database.h in this case) need to be added to
Makefile.am.

Fixes this "make distcheck" error:

  CC     attrib/bluetoothd-gatt-service.o
../attrib/gatt-service.c:35:26: fatal error: att-database.h: No such
file or directory
compilation terminated.
make[2]: *** [attrib/bluetoothd-gatt-service.o] Error 1
make[1]: *** [all] Error 2
make: *** [distcheck] Error 1
2012-04-04 12:54:08 +03:00
Gustavo Padovan
d0179f0d6b update Gustavo's email address 2012-04-04 11:00:10 +03:00
Claudio Takahasi
0949326f92 gattrib: Protect GAttrib when there is a pending write 2012-04-03 14:19:03 +03:00
Claudio Takahasi
bd37938445 attrib: Fix missing Discovery reply when disconnected
This patch fixes missing reply for DiscoverCharacteristics method on
Generic Attribute. If link is disconnected reply message is not sent.
2012-04-03 14:18:47 +03:00
Arik Nemtsov
eeedbc0c14 proximity: reporter: implement D-Bus API
Use a device driver to track all GATT supporting devices and register
a D-Bus interface per remote device.

Implement the "GetProperties" method of the D-Bus interface by querying
the alert level of the remote device in the link-loss and
immediate-alert proximity profiles. The default alert level values for
non-connected devices are "none".
2012-04-03 13:02:06 +03:00
Arik Nemtsov
692ef73ecc proximity: immediate alert: implement immediate alert server
The profile is implemented in immalert.[ch]. A GATT service is
registered with a write callback on the immediate alert level attribute.
This attribute is write-only and is maintained per remote device.

When a remote device write a raises or lowers the alert level,
an appropriate PropertyChanged signal is emitted. When the alert level
of a device is non-zero, a callback is registered on its disconnection.
When the callback is called, the alert level of the device is reset to
zero and an appropriate signal is emitted.
2012-04-03 13:02:02 +03:00
Arik Nemtsov
a20e040fd5 proximity: link loss: implement link loss server
The profile is implemented in linkloss.[ch]. A GATT service is
registered with read/write callbacks on the link-loss alert level
attribute. The alert level is maintained per device. It is returned
on read and updated on write.

When the alert level is non-zero, a callback is registered on the
disconnection of the remote device. If a device with non-zero alert
state is disconnected, an appropriate PropertyChanged signal is emitted
with the alert level previously set by the device. We avoid emitting
a signal when the disconnection was requested by us.
2012-04-03 13:01:07 +03:00
Arik Nemtsov
dd4d0d6b65 proximity: reporter: move definitions to .h and add util function
This allows us to re-use these definitions in GATT sub-profiles.
2012-04-03 12:59:15 +03:00