Commit Graph

15418 Commits

Author SHA1 Message Date
Szymon Janc
f3a0cd30b7 obexd: Remove unused static functions
This fix following build error:

obexd/src/manager.c: At top level:
obexd/src/manager.c:190:13: error:
     ‘dbus_message_iter_append_dict_entry’ defined but not used
     [-Werror=unused-function]
2013-10-04 14:10:33 +03:00
Szymon Janc
d606c25221 obexd/MAP: Remove unused mas_drivers variable
This fix following build error:

  CC     obexd/client/obexd-mns.o
obexd/client/mns.c:344:38: error: ‘mas_drivers’ defined but not used
    [-Werror=unused-variable]
cc1: all warnings being treated as errors
2013-10-04 14:10:33 +03:00
Szymon Janc
21d3b9c3b2 obexd/MAP: Fix missing include
This fix following build error:

  CC     obexd/client/obexd-mns.o
obexd/client/mns.c: In function ‘parse_event_report_handle’:
obexd/client/mns.c:187:2: error: implicit declaration of function
    ‘strtoull’ [-Werror=implicit-function-declaration]
2013-10-04 14:10:33 +03:00
Szymon Janc
fcc8b020d8 obexd/MAP: Fix missing include
This fix following build error:

  CC     obexd/client/obexd-mns.o
obexd/client/mns.c: In function ‘mns_connect’:
obexd/client/mns.c:105:2: error: implicit declaration of function
    ‘manager_register_session’ [-Werror=implicit-function-declaration]
obexd/client/mns.c: In function ‘mns_disconnect’:
obexd/client/mns.c:128:2: error: implicit declaration of function
    ‘manager_unregister_session’ [-Werror=implicit-function-declaration]
2013-10-04 14:10:16 +03:00
Szymon Janc
a78dae8289 obexd/bluetooth: Make dict_append_entry function static
This fix following build error:

  CC     obexd/plugins/obexd-bluetooth.o
obexd/plugins/bluetooth.c:242:6: error: no previous declaration for
     ‘dict_append_entry’ [-Werror=missing-declarations]
2013-10-04 12:21:52 +03:00
Szymon Janc
d0b3d72fea obexd/bluetooth: Remove unused local variables
This ix following build errors:

  CC     obexd/plugins/obexd-bluetooth.o
obexd/plugins/bluetooth.c: In function ‘register_profile_reply’:
obexd/plugins/bluetooth.c:202:10: error: unused variable ‘err’
    [-Werror=unused-variable]

obexd/plugins/bluetooth.c: In function ‘name_acquired’:
obexd/plugins/bluetooth.c:367:15: error: unused variable ‘uuid’
    [-Werror=unused-variable]

obexd/plugins/bluetooth.c: In function ‘name_released’:
obexd/plugins/bluetooth.c:389:15: error: unused variable ‘uuid’
    [-Werror=unused-variable]

obexd/plugins/bluetooth.c: In function ‘bluetooth_start’:
obexd/plugins/bluetooth.c:400:10: error: unused variable ‘ios’
    [-Werror=unused-variable]
2013-10-04 12:21:52 +03:00
Szymon Janc
c1ab916342 obexd/MAP: Fix invalid snprintf format string in map_msg_get()
obexd/client/map.c: In function ‘map_msg_get’:
obexd/client/map.c:446:2: warning: format ‘%u’ expects argument of type
     ‘unsigned int’, but argument 4 has type ‘uint64_t’ [-Wformat]
obexd/client/map.c:446:2: warning: format ‘%u’ expects argument of type
     ‘unsigned int’, but argument 4 has type ‘uint64_t’ [-Wformat]
2013-10-04 10:33:13 +03:00
Marcel Holtmann
603eb343cf doc: Correct a few minor style issues 2013-10-03 23:04:07 -07:00
Marcel Holtmann
aaa9c1dbe4 doc: Add missing title text to static address command 2013-10-03 09:14:07 -07:00
Luiz Augusto von Dentz
de40e1d3b2 obexd/MAP: Store message handle in binary format
This is more efficient in terms of memory and hash lookups, it is also
not prone to string format bugs in remote stacks such as leading zeros
being treated as a different handle as can be experience with
Nokia N950 which sends events using a handle with leading zeros but
message listing don't have them.
2013-10-03 16:46:41 +03:00
Luiz Augusto von Dentz
27bb25c130 obexd/session: Fix crash while processing command queue
session_process_queue can call a callback which can cause the session to
be freed:
Invalid write of size 4
   at 0x4265C9: session_process (session.c:716)
   by 0x3D46047E05: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.3600.3)
   by 0x3D46048157: ??? (in /usr/lib64/libglib-2.0.so.0.3600.3)
   by 0x3D46048559: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.3600.3)
   by 0x40D55C: main (main.c:319)
 Address 0x4d658a8 is 104 bytes inside a block of size 120 free'd
   at 0x4A074C4: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
   by 0x3D4604D9AE: g_free (in /usr/lib64/libglib-2.0.so.0.3600.3)
   by 0x4265B1: session_process_queue (session.c:794)
   by 0x4265C8: session_process (session.c:714)
   by 0x3D46047E05: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.3600.3)
   by 0x3D46048157: ??? (in /usr/lib64/libglib-2.0.so.0.3600.3)
   by 0x3D46048559: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.3600.3)
   by 0x40D55C: main (main.c:319)
2013-10-03 16:46:41 +03:00
Christian Fetzer
8b6966a72f obexd: Prefix folders in event reports with leading slash
The internal representation of folder paths starts with a leading slash.
Therefore we have to prepend it to the folders received in event reports.
2013-10-03 16:46:41 +03:00
Christian Fetzer
c55ebae431 obexd: Handle message shift and message deleted events
Update Folder propery if the message has been shifted or deleted.
2013-10-03 16:46:41 +03:00
Christian Fetzer
85bf0046da obexd: Update Status property in map documentation
For outgoing messages, the status field values are:
"delivery-success", "sending-success", "delivery-failure", "sending-failure"
2013-10-03 16:46:41 +03:00
Christian Fetzer
0e346308d8 obexd: Handle message status events
For outgoing messages, the message status is changed when an event
indicates that the sending/delivery has failed or succeeded.
2013-10-03 16:46:41 +03:00
Christian Fetzer
d4d2b1a1dd obexd: Handle new message event
Register new org.bluez.obex.Message1 D-Bus object when a NewMessage
event report has arrived.
2013-10-03 16:46:40 +03:00
Johan Hedberg
9debd78bfa tools/l2cap-tester: Make setup_powered_server() enable LE advertising when necessary 2013-10-03 14:27:49 +03:00
Johan Hedberg
a98b18079c tools/l2cap-tester: Rename generic test_bredr_server() to test_server() 2013-10-03 14:27:42 +03:00
Johan Hedberg
82574c4fee tools/l2cap-tester: Fix passing correct psm to create_l2cap_sock() 2013-10-03 14:27:34 +03:00
Johan Hedberg
1faed0b2f5 tools/l2cap-tester: Separate server and client setup routines 2013-10-03 14:27:25 +03:00
Johan Hedberg
f203ef5eae tools/l2cap-tester: Add LE support 2013-10-03 14:24:38 +03:00
David Herrmann
7c6ab2ca3e bnep: improve error-msg if bnep.ko is not loaded
bnep.ko, besides others, can be disabled in custom kernels if
network-support is not required. To avoid strange error messages, handle
EPROTONOSUPPORT as a special case and emit a warning that kernel support
is missing.
2013-10-03 09:54:18 +03:00
David Herrmann
e7f623e09a plugin: handle ENOSYS as not-supported
Allow plugins to return -ENOSYS during registration and handle it as
"not-supported" error. It makes the error messages slightly more useful in
case kernel-support is missing for a particular subsystem.
2013-10-03 09:54:15 +03:00
Marcel Holtmann
c287f304df monitor: Fail on invalid command line parameters 2013-10-02 20:46:06 -07:00
Marcel Holtmann
d5bd1b1411 monitor: Use different tables for BR/EDR and LE L2CAP signal channels 2013-10-02 08:24:12 -07:00
Johan Hedberg
cea02ba8ec doc/mgmt-api: Add definition for Set Static Address 2013-10-02 16:22:14 +03:00
Marcel Holtmann
a1fa0a3b49 tools/btmgmt: Fix small copy&paste issue 2013-10-02 06:15:52 -07:00
Marcel Holtmann
84beb3c00c tools/btmgmt: Add support for setting static address 2013-10-02 06:15:52 -07:00
Marcel Holtmann
ea0fa83ebf lib: Add define for mgmt_set_static_address 2013-10-02 06:15:52 -07:00
Johan Hedberg
f49000fe38 tools/mgmt-tester: Fix expected response code for start_discovery case 2013-10-02 16:01:41 +03:00
Christian Fetzer
4d96b9beed obexd: Fix emitting Type property changed signals for messages
In order to determine if the message Type property has changed,
the stored type needs to be compared with the parsed type and not with
the raw value received from the MSE.

This fixes the issue that the property changed signal for the Type
property is emitted for every message on every ListMessage call.
2013-10-02 15:27:22 +03:00
Andrei Emeltchenko
15954a450e sdp: Check for correct pkt size received instead of error
Check that the full header is received in recv().
2013-10-02 14:11:08 +03:00
Anderson Lizardo
fd8d0713e8 lib: Fix invalid "whitespace" on company identifier string
Somehow, the invalid multibyte sequence "\xC2\xA0" (which is displayed
as a whitespace) was inserted on a company identifier string. Fix this
to avoid a bogus diff when running tools/update_compids.sh.
2013-10-02 14:09:01 +03:00
Anderson Lizardo
703f25174d tools: Fix update_compids.sh to avoid non-ASCII output
Some distros have html2text patches that may generate non-ASCII output
even when -ascii is used. This patch adds another case (seen in Fedora)
where HTML entity   (non-breaking space) is converted into a
multibyte whitespace.

Also add a sanity check to make sure non-ASCII text is not introduced in
lib/bluetooth.c.
2013-10-02 14:09:01 +03:00
Marcel Holtmann
a29602bc3b doc: Small beautification 2013-10-02 04:01:54 -07:00
Johan Hedberg
87fc18fe0c tools/mgmt-tester: Add some basic set_bredr set cases 2013-10-02 13:39:08 +03:00
Johan Hedberg
516007fa51 tools/btmgmt: Add support for set_bredr 2013-10-02 12:16:57 +03:00
Johan Hedberg
7c6c6e179a lib: Add define for mgmt_set_bredr 2013-10-02 12:16:57 +03:00
Johan Hedberg
0e33783ff4 doc/mgmt-api: Add Set BR/EDR command definition 2013-10-02 12:16:57 +03:00
Johan Hedberg
eb505db7cc tools/btmgmt: Fix minor whitespace issue 2013-10-02 10:41:30 +03:00
Johan Hedberg
cad62a72df tools/mgmt-tester: Update expected settings to support recent HS changes 2013-10-01 09:29:12 +03:00
Marcel Holtmann
997fa6b2d0 tools/mgmt-tester: Add test cases for enabling high speed 2013-09-30 22:03:59 -07:00
Marcel Holtmann
a1dcb380b3 tools/mgmt-tester: Cleanup indentation of test cases 2013-09-30 21:37:45 -07:00
Szymon Janc
cf8a492dfd lib: Fix use of uninitialized variable in sdp_set_profile_descs
Error path on default case was not breaking loop. To keep error
handling similar all error path were converted to use goto.

This fix following:
target  C: libbluetooth <= external/bluetooth/bluez/android/../lib/sdp.c
lib/sdp.c: In function 'sdp_set_profile_descs':
lib/sdp.c:487:10: warning: 'values[0]' may be used uninitialized in
    this function [-Wmaybe-uninitialized]
lib/sdp.c:2562:19: note: 'values[0]' was declared here
lib/sdp.c:545:11: warning: 'dtds[0]' may be used uninitialized in this
    function [-Wmaybe-uninitialized]
lib/sdp.c:2562:9: note: 'dtds[0]' was declared here
2013-09-30 21:16:41 +03:00
Johan Hedberg
c6e0cd59c4 test/test-hfp: Fix passing missing backlog parameter to sco.listen() 2013-09-29 17:26:16 +03:00
Luiz Augusto von Dentz
ed6baf1417 obexd/client: Fix not setting Transfer.Size for GET operations
GET operations may return the length header in the first response which
should be set as transfer Size property.
2013-09-29 17:01:07 +03:00
Luiz Augusto von Dentz
df65753b0a gobex: Revert g_obex_pending_req_abort to static pending_req_abort
This reverts the changes introduced in
9095deb825 that made pending_req_abort
public which is not necessary considering g_obex_cancel_req can do the
same and is safe to call even if the request is not pending.
2013-09-29 17:01:07 +03:00
Luiz Augusto von Dentz
c9f3b81d07 gobex: Fix crash on g_obex_pending_req_abort
It is not safe to call g_obex_pending_req_abort directly as pending_req
can be NULL:
Invalid read of size 4
   at 0x41231E: g_obex_pending_req_abort (gobex.c:693)
   by 0x416A8A: g_obex_cancel_transfer (gobex-transfer.c:647)
   by 0x42DEF2: obc_transfer_cancel (transfer.c:180)
   by 0x43D833: process_message.isra.5 (object.c:259)
   by 0x3B0701CE85: ??? (in /usr/lib64/libdbus-1.so.3.7.4)
   by 0x3B0700FA30: dbus_connection_dispatch (in /usr/lib64/libdbus-1.so.3.7.4)
   by 0x43A5B7: message_dispatch (mainloop.c:76)
   by 0x3B03C48962: ??? (in /usr/lib64/libglib-2.0.so.0.3600.3)
   by 0x3B03C47E05: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.3600.3)
   by 0x3B03C48157: ??? (in /usr/lib64/libglib-2.0.so.0.3600.3)
   by 0x3B03C48559: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.3600.3)
   by 0x40D53C: main (main.c:319)
 Address 0x30 is not stack'd, malloc'd or (recently) free'd
2013-09-29 17:01:07 +03:00
Marcel Holtmann
d393673986 tools: Limit controller type to two bits of device info type 2013-09-28 21:00:02 -07:00
Marcel Holtmann
24d9643a10 lib: Update company identifiers 2013-09-28 00:05:50 -07:00