Commit Graph

14657 Commits

Author SHA1 Message Date
Christian Fetzer
e859c03231 obexd: Add PushMessage
Push message has been implemented similar to send file (OPP),
the message to send (in bMessage format) is read from a file.
2013-02-07 13:49:00 +02:00
Johan Hedberg
e9c1672ada test: Fix missing call to parser.parse_args() in test-proximity 2013-02-04 14:29:15 +02:00
Szymon Janc
d1fbda1e15 shared: Fix use after free in read_watch_destroy
read_watch_destroy is called when received_data returns FALSE.
free mgmt in read_watch_destroy instead of received_data to avoid
use after free.

Invalid write of size 4
   at 0x8051604: read_watch_destroy (mgmt.c:271)
   by 0x48C7468E: g_source_callback_unref (gmain.c:1457)
   by 0x48C77287: g_main_context_dispatch (gmain.c:2723)
   by 0x48C774FF: g_main_context_iterate.isra.22 (gmain.c:3290)
   by 0x48C77962: g_main_loop_run (gmain.c:3484)
   by 0x805393E: tester_run (tester.c:784)
   by 0x804D1C7: main (mgmt-tester.c:2558)
 Address 0x4039b80 is 16 bytes inside a block of size 76 free'd
   at 0x4007F0F: free (vg_replace_malloc.c:446)
   by 0x48C7D44B: standard_free (gmem.c:98)
   by 0x48C7D607: g_free (gmem.c:252)
   by 0x8051BB6: received_data (mgmt.c:337)
   by 0x48CBA72E: g_io_unix_dispatch (giounix.c:167)
   by 0x48C7715A: g_main_context_dispatch (gmain.c:2715)
   by 0x48C774FF: g_main_context_iterate.isra.22 (gmain.c:3290)
   by 0x48C77962: g_main_loop_run (gmain.c:3484)
   by 0x805393E: tester_run (tester.c:784)
   by 0x804D1C7: main (mgmt-tester.c:2558)
2013-02-03 12:44:59 +01:00
Marcel Holtmann
f5c43df669 monitor: Decode supported commands result 2013-02-02 11:21:50 +01:00
Marcel Holtmann
37b90a9581 monitor: Fix wrong supported commands bit value 2013-02-02 11:21:50 +01:00
Johan Hedberg
b0dfcc41f7 tools: Fix mgmt-tester LE expected supported settings 2013-02-02 08:50:40 +00:00
Johan Hedberg
de3cadbf40 tools: Add basic mgmt_set_local_name EIR test case 2013-02-02 08:50:39 +00:00
Johan Hedberg
6f3c1e7a42 core: Use more compact definitions for zero-tail byte arrays 2013-02-02 08:50:39 +00:00
Johan Hedberg
40d6efeb47 tools: Add basic mgmt_set_local_name success test cases 2013-02-02 08:50:39 +00:00
Johan Hedberg
ee4ca49abf tools: Generalize alternate mgmt event handling for mgmt-tester 2013-02-02 08:50:39 +00:00
Johan Hedberg
b0b3b86240 audio: Fix uint64_t format specifier 2013-02-02 08:50:39 +00:00
Marcel Holtmann
9ea3f21c6e Release 5.2 2013-02-02 01:41:17 +01:00
Marcel Holtmann
022756d28e lib: Update list of company identifiers 2013-02-02 01:19:29 +01:00
Luiz Augusto von Dentz
63f45a5ed0 AVRCP: Set addressed player as browsed player
This send SetBrowsedPlayer after getting the player details.
2013-02-01 15:33:11 -06:00
Luiz Augusto von Dentz
223116ddd8 AVRCP: Split event handing to its own functions 2013-02-01 15:32:36 -06:00
Luiz Augusto von Dentz
6ba937831e AVRCP: Get player list if supported
If addressed player changed is supported get the list of players
2013-02-01 15:32:04 -06:00
Luiz Augusto von Dentz
6ff92086f1 AVRCP: Register to addressed player changed event if supported
This enables registering for addressed player changed event and handle
the interim response setting the player id and uid counter to the current
player.
2013-02-01 15:31:44 -06:00
Luiz Augusto von Dentz
0a42537059 AVRCP: Avoid repeating command due to changed event
Currently we are repeating the same command twice for notification, first
for changed and then latter for interim response.

To avoid this the code now just do it for interim responses, changed
responses just trigger another registration.
2013-02-01 15:31:25 -06:00
Luiz Augusto von Dentz
56f02613f9 media-api: Add org.bluez.MediaFolder1
This interface adds support for browsing and searching in the player's
storage using AVRCP 1.4/1.5.

Some remarks about the design:

  - Exposing UIDCounter and UIDs was considered, but the spec seems to have
    missed to define the player's id persistency. There are also the fact that
    UIDCounter alone does not guarantee persistency across sessions and do not
    provide what exact items have changed, so in the end exposing these
    details will bring almost no value.
  - Indexing or caching the whole media library is not recommended, Bluetooth
    is too slow for that and even vendors such as Apple do not recommend doing
    it, so the only items keep in cache are the current listed ones.
  - Addressed vs Browsed player is done implicitly when accessed, this was done
    to simplify the API and avoid confusions between applications and players.
2013-02-01 15:31:15 -06:00
Luiz Augusto von Dentz
eb42911f65 AVDTP: Fix memory leak
56 (16 direct, 40 indirect) bytes in 1 blocks are definitely lost in loss record 173 of 263
   at 0x4A0883C: malloc (vg_replace_malloc.c:270)
   by 0x4C8568E: g_malloc (in /usr/lib64/libglib-2.0.so.0.3400.2)
   by 0x4C9A7F1: g_slice_alloc (in /usr/lib64/libglib-2.0.so.0.3400.2)
   by 0x4C9BB92: g_slist_append (in /usr/lib64/libglib-2.0.so.0.3400.2)
   by 0x422072: send_req (avdtp.c:2569)
   by 0x422D0B: avdtp_discover (avdtp.c:3380)
   by 0x41D16C: source_setup_stream (source.c:307)
   by 0x41D1EF: source_connect (source.c:331)
   by 0x465411: connect_next (device.c:1073)
   by 0x466C92: device_profile_connected (device.c:1097)
   by 0x4629EB: ext_connect (profile.c:950)
   by 0x44AECB: connect_cb (btio.c:230)
2013-02-01 15:14:07 -06:00
Johan Hedberg
68e1ae26b8 core: Fix missing return statement in ext_svc_complete 2013-02-01 11:53:07 -06:00
Vinicius Costa Gomes
3d85cf30ed device: Fix not marking svc_resolved when loaded from storage
When the device is loaded from storage, we should mark it as it
services were resolved.
2013-02-01 11:44:45 -06:00
Johan Hedberg
0b55222323 core: Fix trying go stop passive scanning multiple times 2013-02-01 10:09:42 -06:00
Johan Hedberg
888a1c1774 core: Add debug log to stop_passive_scanning_complete 2013-02-01 10:03:46 -06:00
Patrik Flykt
365cbb27c1 network: Fix user data handling on unregister
User data in unregister_server() is a network_adapter struct. Unregistering
using full UUID will now also work.
2013-02-01 09:57:01 -06:00
Johan Hedberg
7643aac9d8 gdbus: Fix unpublished interface signal emission
If we haven't published an interface yet (i.e. it's in the data->added
list), we should just ignore any property changed indications as the
values for the properties will anyway be part of the InterfacesAdded
signal.
2013-02-01 09:05:34 -06:00
Johan Hedberg
11b9adb69a emulator: Fix BR/EDR-only and LE-only supported command checks 2013-01-31 21:47:22 -06:00
Johan Hedberg
dbab424350 emulator: Add command line options for selecting controller type to btvirt 2013-01-31 21:32:31 -06:00
Johan Hedberg
24c2977006 emulator: Use BR/EDR/LE vhci type as default for btvirt 2013-01-31 21:22:21 -06:00
Johan Hedberg
e6356399c9 tools: Add LE-only test case support to mgmt-tester 2013-01-31 16:08:51 -06:00
Johan Hedberg
83313af7ae tools: Add BR/EDR-only test case support to mgmt-tester 2013-01-31 16:04:32 -06:00
Johan Hedberg
4823e85d51 tools: Fix mgmt-tester BR/EDR/LE test macro naming 2013-01-31 16:01:21 -06:00
Johan Hedberg
6b0eaec9bd emulator: Fix controller version for BR/EDR type 2013-01-31 14:52:11 -06:00
Luiz Augusto von Dentz
b926af1c4f AVRCP: Get track duration using GetPlayStatus command
Some stacks, notably broadcom, don't send track duration together with
other metadata so it has to be set using GetPlayStatus.
2013-01-31 14:41:52 -06:00
Luiz Augusto von Dentz
5c62723d58 A2DP: Fix not setting setup error to NULL
Once the error is informed to the callback it should be properly freed and
set to NULL otherwise a subsequent operation may end up reusing the same
error which might lead to crashes.
2013-01-31 14:41:40 -06:00
Luiz Augusto von Dentz
6a4f06b68e AVCTP: Fix memory leak
651 (280 direct, 371 indirect) bytes in 7 blocks are definitely lost in loss record 306 of 332
   at 0x4A06B2F: calloc (vg_replace_malloc.c:593)
   by 0x319724D706: g_malloc0 (in /usr/lib64/libglib-2.0.so.0.3400.2)
   by 0x418A54: avctp_send_browsing_req (avctp.c:1457)
   by 0x41A330: avrcp_handle_event (avrcp.c:1998)
   by 0x417810: session_cb (avctp.c:702)
   by 0x3197247A74: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.3400.2)
   by 0x3197247DA7: ??? (in /usr/lib64/libglib-2.0.so.0.3400.2)
   by 0x31972481A1: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.3400.2)
   by 0x409D6E: main (main.c:583)
2013-01-31 14:41:33 -06:00
Luiz Augusto von Dentz
e50edf7cbe AVCTP: Fix allways destroying browsing channel
This reverts commit 53d3fc3fad that leads
to always destroy the browsing channel because the callback changes the
state.

To fix session_browsing_cb naw takes care of destroying the channel if it
disconnects.
2013-01-31 14:41:25 -06:00
Luiz Augusto von Dentz
c8cc30465d tools: Fix mpris-player creating busname starting with digit
D-Bus does not allow a bus name starting with digits after . so the code
now prefix with bt_ if the device name starts with a digit.
2013-01-31 14:41:11 -06:00
Luiz Augusto von Dentz
6777744886 tools: Use device Alias instead of Name in mpris-player
User may have set a different Name using Alias, Alias should always
be set.
2013-01-31 14:40:57 -06:00
Luiz Augusto von Dentz
5daa339eb6 hcidump: Fix parsing of SetBrowsedPlayer 2013-01-31 14:38:11 -06:00
Luiz Augusto von Dentz
4700a58ee9 hcidump: Fix parsing of GetCurrentPlayerApplicationSettingValue 2013-01-31 14:37:58 -06:00
Luiz Augusto von Dentz
5ee8965bd4 hcidump: Distinct Control and Browsing AVCTP channels
This prints the respective channel of the trafic
2013-01-31 14:37:45 -06:00
Johan Hedberg
9c12c5b8d0 tools: Update tester apps to use new hciemu API 2013-01-31 14:33:33 -06:00
Johan Hedberg
939da35000 shared: Provide hciemu type in hciemu_new() 2013-01-31 14:31:51 -06:00
Johan Hedberg
946e51cdc3 emulator: Create separate BR/EDR, BR/EDR/LE and LE vhci types 2013-01-31 14:26:40 -06:00
Johan Hedberg
1ffa263826 emulator: Create separate server BR/EDR/LE and BR/EDR types 2013-01-31 14:26:40 -06:00
Johan Hedberg
cdc90de8a7 shared: Create BR/EDR/LE device type by default 2013-01-31 14:26:40 -06:00
Johan Hedberg
d61dcac1fc emulator: Create separate BR/EDR/LE and BR/EDR device types 2013-01-31 14:26:40 -06:00
Johan Hedberg
a5ee04e208 TODO: Remove completed passive scanning entry 2013-01-31 13:44:41 -06:00
Johan Hedberg
a403509832 core: Stop passive scanning when removing last item from connect_list 2013-01-31 13:44:20 -06:00