OSDN Git Service
Johan Hedberg [Mon, 24 Oct 2011 12:25:34 +0000 (14:25 +0200)]
Add User Passkey commands and events to mgmt
Johan Hedberg [Mon, 24 Oct 2011 12:24:53 +0000 (14:24 +0200)]
Rename mgmt key commands and events
Johan Hedberg [Mon, 24 Oct 2011 12:14:53 +0000 (14:14 +0200)]
Add timeout to Set Discoverable mgmt command
Johan Hedberg [Mon, 24 Oct 2011 12:14:16 +0000 (14:14 +0200)]
Update controller info command with current plan
Johan Hedberg [Mon, 24 Oct 2011 10:56:55 +0000 (12:56 +0200)]
Fix whitespace for fast connectable mgmt command doc
Johan Hedberg [Mon, 24 Oct 2011 10:16:18 +0000 (12:16 +0200)]
Add (legacy) name resolution handling to mgmt API
Lucas De Marchi [Fri, 21 Oct 2011 17:58:27 +0000 (15:58 -0200)]
Unregister players' events when disconnected
Lucas De Marchi [Fri, 21 Oct 2011 17:58:26 +0000 (15:58 -0200)]
Fix leak of GTimer
Lucas De Marchi [Fri, 21 Oct 2011 17:58:25 +0000 (15:58 -0200)]
Add missing TRACK-REACHED-START event
When track is changed, we automatically start to play it, therefore we
need to notify CT regarding this event.
Lucas De Marchi [Fri, 21 Oct 2011 17:58:24 +0000 (15:58 -0200)]
Fix handling of dbus signals
We're previously leaking a D-Bus message and always returning that
the signal was not handled.
Frédéric Danis [Fri, 21 Oct 2011 10:10:23 +0000 (12:10 +0200)]
Add EIR length parameter to eir_parse()
LE uses shorter EIR (31 bytes) than HCI (240 bytes)
Andrei Emeltchenko [Tue, 18 Oct 2011 08:23:11 +0000 (11:23 +0300)]
Add btohll / htobll macros
Handle 64 bit swap
Andrei Emeltchenko [Tue, 18 Oct 2011 08:23:10 +0000 (11:23 +0300)]
Add definitions for L2CAP fixed channels
Frédéric Danis [Thu, 20 Oct 2011 12:53:04 +0000 (14:53 +0200)]
Simplify eir_parse_uuid* functions
Frédéric Danis [Thu, 20 Oct 2011 08:53:37 +0000 (10:53 +0200)]
Add unit/test-eir to .gitignore
Frédéric Danis [Thu, 20 Oct 2011 08:53:36 +0000 (10:53 +0200)]
Simplify eir_parse function
Lucas De Marchi [Wed, 19 Oct 2011 12:05:00 +0000 (10:05 -0200)]
Fix MediaPlayer documentation
Lucas De Marchi [Tue, 18 Oct 2011 23:24:39 +0000 (21:24 -0200)]
Fix leak of dbus message
Dmitriy Paliy [Wed, 19 Oct 2011 08:19:58 +0000 (11:19 +0300)]
Fix release all sessions on powering adapter off
When adapter is powered off, all sessions should be released without
changing mode, which is contrary to what session_remove does. This
prevents from such situation when powering off leads to new mode
derived from mode_sessions.
Currently, if there are multiple mode sessions requested by different
clients, powering adapter off results in powering immediately it on.
Johan Hedberg [Wed, 19 Oct 2011 08:09:13 +0000 (11:09 +0300)]
sbc: Reduce for-loop induced indentation in sbc_unpack_frame
Siarhei Siamashka [Mon, 17 Oct 2011 01:24:38 +0000 (04:24 +0300)]
sbc: overflow bugfix and audio decoding quality improvement
The "(((audio_sample << 1) | 1) << frame->scale_factor[ch][sb])"
part of expression
"frame->sb_sample[blk][ch][sb] =
(((audio_sample << 1) | 1) << frame->scale_factor[ch][sb]) /
levels[ch][sb] - (1 << frame->scale_factor[ch][sb])"
in "sbc_unpack_frame" function can sometimes overflow 32-bit signed int.
This problem can be reproduced by first using bitpool 128 and encoding
some random noise data, and then feeding it to sbc decoder. The obvious
thing to do would be to change "audio_sample" variable type to uint32_t.
However the problem is a little bit more complicated. According
to the section "12.6.2 Scale Factors" of A2DP spec:
scalefactor[ch][sb] = pow(2.0, (scale_factor[ch][sb] + 1))
And according to "12.6.4 Reconstruction of the Subband Samples":
sb_sample[blk][ch][sb] = scalefactor[ch][sb] *
((audio_sample[blk][ch][sb]*2.0+1.0) / levels[ch][sb]-1.0);
Hence the current code for calculating "sb_sample[blk][ch][sb]" is
not quite correct, because it loses one least significant bit of
sample data and passes twice smaller sample values to the synthesis
filter (the filter also deviates from the spec to compensate this).
This all has quite a noticeable impact on audio quality. Moreover,
it makes sense to keep a few extra bits of precision here in order
to minimize rounding errors. So the proposed patch introduces a new
SBCDEC_FIXED_EXTRA_BITS constant and uses uint64_t data type
for intermediate calculations in order to safeguard against
overflows. This patch intentionally addresses only the quality
issue, but performance can be also improved later (like replacing
division with multiplication by reciprocal).
Test for the difference of sbc encoding/decoding roundtrip vs.
the original audio file for joint stereo, bitpool 128, 8 subbands
and http://media.xiph.org/sintel/sintel-master-st.flac sample
demonstrates some quality improvement:
=== before ===
--- comparing original / sbc_encoder.exe + sbcdec ---
stddev: 4.64 PSNR: 82.97 bytes:
170495708/
170496000
=== after ===
--- comparing original / sbc_encoder.exe + sbcdec ---
stddev: 1.95 PSNR: 90.50 bytes:
170495708/
170496000
Marcel Holtmann [Tue, 18 Oct 2011 22:48:36 +0000 (15:48 -0700)]
Use color output for unit tests
Johan Hedberg [Tue, 18 Oct 2011 11:33:32 +0000 (14:33 +0300)]
Add basic unit tests framework for EIR parsing
Frédéric Danis [Tue, 18 Oct 2011 10:10:53 +0000 (12:10 +0200)]
Fix implicit declaration of 'g_slist_free_full'
audio/avrcp.c: In function 'avrcp_unregister':
audio/avrcp.c:1253: error: implicit declaration of function 'g_slist_free_full'
thermometer/thermometer.c: In function 'destroy_char':
thermometer/thermometer.c:79: error: implicit declaration of function 'g_slist_free_full'
Johan Hedberg [Tue, 18 Oct 2011 08:15:23 +0000 (11:15 +0300)]
Move SDP client functions from glib-helper.c to sdp-client.c
Johan Hedberg [Tue, 18 Oct 2011 07:57:06 +0000 (10:57 +0300)]
Add glib-compat.h to deal with issues in old GLib versions
Lucas De Marchi [Mon, 17 Oct 2011 20:34:31 +0000 (18:34 -0200)]
AVRCP: Implement RequestContinuingResponse PDU
Lucas De Marchi [Mon, 17 Oct 2011 20:34:30 +0000 (18:34 -0200)]
AVRCP: Implement AbortContinuingResponse PDU
Lucas De Marchi [Mon, 17 Oct 2011 20:34:29 +0000 (18:34 -0200)]
AVRCP: respond with UINT32_MAX if duration is not available
Section 5.4.1 of AVRCP 1.3 spec says:
If TG does not support SongLength And SongPosition on TG, then TG shall
return 0xFFFFFFFF.
SongPosition is always available, but song length depends on user to
provied it.
Lucas De Marchi [Mon, 17 Oct 2011 20:34:28 +0000 (18:34 -0200)]
AVRCP: implement TRACK-REACHED-START event
Lucas De Marchi [Mon, 17 Oct 2011 20:34:27 +0000 (18:34 -0200)]
AVRCP: Use track's UID in event notification
When registering for TRACK_CHANGED event, CT expects the track's UID in
the INTERIM and CHANGED responses. According to AVRCP 1.3 spec, there
are only 2 possible values:
1) 0: there's a track selected
2) UINT32_MAX: there's no track selected
AVRCP 1.4 reserves the value UINT64_MAX for the second case. Since this
later value is the one used in certification process for best IOP
we return UINT64_MAX instead of the former.
This implementation allows to pass PTS test TP/NFY/BV-05-C.
Johan Hedberg [Mon, 17 Oct 2011 15:11:01 +0000 (18:11 +0300)]
hciops: fix discov_state when powering off an adapter
Johan Hedberg [Mon, 17 Oct 2011 14:43:01 +0000 (17:43 +0300)]
Simplify property variable usage in btd_adapter_stop
Johan Hedberg [Mon, 17 Oct 2011 14:38:56 +0000 (17:38 +0300)]
Fix updating Adapter.Discovering property when powering off
Chan-yeol Park [Mon, 17 Oct 2011 12:07:37 +0000 (21:07 +0900)]
Fix input pending connect handling
iconn->pending_connect needs to be freed after sending the error reply
Luiz Augusto von Dentz [Mon, 17 Oct 2011 09:47:28 +0000 (12:47 +0300)]
hciops: fix adapter initialization when commands are missed
Sometimes after e.g, suspend we miss some initialization commands from
the kernel, even though we had a workaround for this it doesn't really
work as expected since the adapter must be up in order to resend.
To fix this problem the resend logic is moved after DEVUP.
Johan Hedberg [Mon, 17 Oct 2011 08:25:25 +0000 (11:25 +0300)]
Simplify process_thermometer_char() logic
Santiago Carot-Nemesio [Thu, 13 Oct 2011 15:29:22 +0000 (17:29 +0200)]
Fix thermometer Intermediate property changes
Set Intermediate property if intermediate temperature characteristic is
supported
Santiago Carot-Nemesio [Thu, 13 Oct 2011 15:29:21 +0000 (17:29 +0200)]
Read measurement interval characteristic
Santiago Carot-Nemesio [Thu, 13 Oct 2011 15:29:20 +0000 (17:29 +0200)]
Read temperature type characteristic
Santiago Carot-Nemesio [Thu, 13 Oct 2011 15:29:19 +0000 (17:29 +0200)]
Get all characteristics in thermometer service
Santiago Carot-Nemesio [Thu, 13 Oct 2011 15:29:18 +0000 (17:29 +0200)]
Add handler function to manage GATT indications
Santiago Carot-Nemesio [Thu, 13 Oct 2011 15:29:17 +0000 (17:29 +0200)]
Add functions to manage attio callbacks
Santiago Carot-Nemesio [Thu, 13 Oct 2011 15:29:16 +0000 (17:29 +0200)]
Unregister Health Thermometer Interface
Santiago Carot-Nemesio [Thu, 13 Oct 2011 15:29:15 +0000 (17:29 +0200)]
Register Health Thermometer Interface
Santiago Carot-Nemesio [Thu, 13 Oct 2011 15:29:14 +0000 (17:29 +0200)]
Get thermometer service range to load the driver.
Johan Hedberg [Fri, 14 Oct 2011 11:23:05 +0000 (14:23 +0300)]
hcitool: Fix EIR parsing
There were missing buffer size checks and wrong assumptions about the
EIR data length (core spec 4.0 defines it to be max 31 bytes, so the
name can be max 29 bytes).
Johan Hedberg [Fri, 14 Oct 2011 08:15:14 +0000 (11:15 +0300)]
Fix leaks and buffer overflows in EIR parsing
By calling g_utf8_validate and allocating eir->name inside the parsing
loop the code was exposing itself to buffer overflows and memory leaks.
This is because the check for incorrect length fields is only done after
exiting the loop (if (len > HCI_MAX_EIR_LENGTH)). By only setting a
pointer to the name and doing the processing after checking the length
validity both issues can be avoided.
Vinicius Costa Gomes [Thu, 13 Oct 2011 21:39:07 +0000 (18:39 -0300)]
Add support for parsing the remote name during LE Scan
Lucas De Marchi [Thu, 13 Oct 2011 12:57:03 +0000 (09:57 -0300)]
Make title always available in metadata
Lucas De Marchi [Thu, 13 Oct 2011 12:57:02 +0000 (09:57 -0300)]
Don't overwrite metadata when changing track
If we use the same hash table to set the new metadata, we have 2
undesired behaviors:
1) New track may contain fields from previous track if it didn't set all
the fields
2) If we fail on parsing the signal, we will still change some of the
fields
Dmitriy Paliy [Thu, 13 Oct 2011 10:25:51 +0000 (13:25 +0300)]
Fix +CLCC in maemo6 during CSD_CALL_STATUS_COMING
This fixes the same issue as in
8a6119ea1c685fc61419ee444a5967596f524c1c
but for CSD_CALL_STATUS_COMING. Call status change sequence in csd is
IDLE to COMING, COMING to PROCEEDING, and PROCEEDING to WAITING.
Returned 'state of the call' value after CSD_CALL_STATUS_COMING, as well
as after CSD_CALL_STATUS_PROCEEDING, in +CLCC shall be 5 (waiting, MT
call) instead of 4 (incoming, MT call) in maemo6 telephony driver for the
second incoming call.
Dmitriy Paliy [Thu, 13 Oct 2011 10:02:38 +0000 (13:02 +0300)]
Fix crash on power off in maemo6 after sending DTMF
This fixes regression introduced in
b48e610314fb466035b198f594c5b6a68126fcf1. Crash happens when powering
off adapter after sending DTMF tone.
Lucas De Marchi [Wed, 12 Oct 2011 15:11:22 +0000 (12:11 -0300)]
Improve test/simple-player to allow user interaction
Allow user to trigger TrackChanged and PropertyChanged. Calls made by
remote side (coming from D-Bus) are printed to stderr while the ones to
interact with user go to stdout.
Lucas De Marchi [Wed, 12 Oct 2011 15:11:21 +0000 (12:11 -0300)]
Refactor to share code
Refactor code when we are 'listing selected attributes' to share code
with 'listing all attributes'. This way we always keep the list of
attributes in a GList, and call player_get_media_attribute() in only one
place.
Lucas De Marchi [Wed, 12 Oct 2011 15:11:20 +0000 (12:11 -0300)]
AVRCP: Only return available metadata attributes
When remote side requests all available metadata (i.e. it gives number
attributes equals to 0) do not return zero-length strings for
unavailable items. The only exception is title, that must be always present.
Lucas De Marchi [Wed, 12 Oct 2011 15:11:19 +0000 (12:11 -0300)]
AVRCP: Check if len matches number of IDs
If number of attributes remote side provided is larger than the length
we read, we would read garbage from stack memory.
Lucas De Marchi [Wed, 12 Oct 2011 15:11:18 +0000 (12:11 -0300)]
AVRCP: Return error for invalid metadata IDs
Lucas De Marchi [Wed, 12 Oct 2011 15:11:17 +0000 (12:11 -0300)]
Add callback to list available metadata IDs
Lucas De Marchi [Wed, 12 Oct 2011 15:11:16 +0000 (12:11 -0300)]
AVRCP: Do not list values for unsupported attributes
Lucas De Marchi [Wed, 12 Oct 2011 15:11:15 +0000 (12:11 -0300)]
Move debug messages to their correspondent getters
Lucas De Marchi [Wed, 12 Oct 2011 15:11:12 +0000 (12:11 -0300)]
Fix typo on doc
Lucas De Marchi [Wed, 12 Oct 2011 15:11:11 +0000 (12:11 -0300)]
Add mpris-player to .gitignore
Johan Hedberg [Wed, 12 Oct 2011 13:53:58 +0000 (16:53 +0300)]
Add Szymon Janc to AUTHORS
Johan Hedberg [Wed, 12 Oct 2011 13:52:29 +0000 (16:52 +0300)]
Add Lucas De Marchi to AUTHORS
Claudio Takahasi [Tue, 11 Oct 2011 18:47:36 +0000 (15:47 -0300)]
Remove leftover code of primary service storage
Primary services related to a given address is already being removed
in delete_device_service() function.
Claudio Takahasi [Tue, 11 Oct 2011 18:47:35 +0000 (15:47 -0300)]
Remove leftover code of device type storage
Luiz Augusto von Dentz [Mon, 10 Oct 2011 11:07:40 +0000 (14:07 +0300)]
Update control documentation to reflect the implementation
Many of the methods and signal don't make much sense since we now have
a dedicated interfaces that are Media and MediaPlayer.
Dmitriy Paliy [Tue, 11 Oct 2011 11:34:58 +0000 (14:34 +0300)]
Fix call status in +CLCC for maemo6 telephony
If list current calls is requested when there is second incoming call
and csd call status is CSD_CALL_STATUS_PROCEEDING, then returned 'state
of the call' value in +CLCC is 4 (incoming, MT call), which is incorrect.
Indication than proceeds from incoming to waiting state.
This patch sets the corresponding value to 5 (waiting, MT call) in
maemo6 telephony driver for the second call.
Johan Hedberg [Tue, 11 Oct 2011 21:48:59 +0000 (00:48 +0300)]
Fix compilation error on 32-bit systems
This fixes the following compilation error with GLib on 32-bit sytems:
audio/media.c: In function 'get_setting':
audio/media.c:1109:44: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
audio/media.c: In function 'set_setting':
audio/media.c:1132:41: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
Luiz Augusto von Dentz [Thu, 6 Oct 2011 12:46:31 +0000 (15:46 +0300)]
Add mpris-player to test
It gather information from players implementing mpris spec and convert
to org.bluez.MediaPlayer spec.
Vinicius Costa Gomes [Thu, 6 Oct 2011 18:03:27 +0000 (15:03 -0300)]
Add support for cancelling a LE Scan with Control-C
Vinicius Costa Gomes [Thu, 6 Oct 2011 18:01:48 +0000 (15:01 -0300)]
Fix using the attribute struct for encoding ATT pdus
The enconding and decoding of ATT pdus should be kept as much
free of dependences from other parts of the code as possible, so
it can be used in many contexts.
In this case, for encoding and decoding notifications and indications
we did have to pass an instance of an attribute instead of direct
values.
Luiz Augusto von Dentz [Thu, 6 Oct 2011 15:35:17 +0000 (18:35 +0300)]
Fix crash while registering player
Crash is caused by not removed freed player from the list:
Invalid read of size 8
at 0x13E7B5: media_adapter_find_player (media.c:861)
by 0x13FEBC: register_player (media.c:1561)
by 0x120DFE: process_message (object.c:224)
by 0x4F6E9A0: ??? (in /lib64/libdbus-1.so.3.5.6)
by 0x4F6092F: dbus_connection_dispatch (in /lib64/libdbus-1.so.3.5.6)
by 0x11F787: message_dispatch (mainloop.c:80)
by 0x4C762CA: ??? (in /lib64/libglib-2.0.so.0.3000.0)
by 0x4C74ADC: g_main_context_dispatch (in /lib64/libglib-2.0.so.0.3000.0)
by 0x4C752D7: ??? (in /lib64/libglib-2.0.so.0.3000.0)
by 0x4C75824: g_main_loop_run (in /lib64/libglib-2.0.so.0.3000.0)
by 0x11EE4B: main (main.c:485)
Address 0x642ef30 is 16 bytes inside a block of size 80 free'd
at 0x4A0662E: free (vg_replace_malloc.c:366)
by 0x4C7B7F2: g_free (in /lib64/libglib-2.0.so.0.3000.0)
by 0x12D292: player_destroy (avrcp.c:1099)
by 0x120C38: service_filter (watch.c:477)
by 0x120950: message_filter (watch.c:527)
by 0x4F608E5: dbus_connection_dispatch (in /lib64/libdbus-1.so.3.5.6)
by 0x11F787: message_dispatch (mainloop.c:80)
by 0x4C762CA: ??? (in /lib64/libglib-2.0.so.0.3000.0)
by 0x4C74ADC: g_main_context_dispatch (in /lib64/libglib-2.0.so.0.3000.0)
by 0x4C752D7: ??? (in /lib64/libglib-2.0.so.0.3000.0)
by 0x4C75824: g_main_loop_run (in /lib64/libglib-2.0.so.0.3000.0)
by 0x11EE4B: main (main.c:485)
Luiz Augusto von Dentz [Thu, 6 Oct 2011 15:35:16 +0000 (18:35 +0300)]
Fix not being able to unregister player via UnregisterPlayer
Lucas De Marchi [Thu, 6 Oct 2011 11:49:45 +0000 (08:49 -0300)]
AVRCP: do not allow CT to set a property not supported
If player never set a property, it means it doesn't support it. Doesn't
allow the remote side to set it and send a REJECTED response.
Lucas De Marchi [Thu, 6 Oct 2011 11:49:44 +0000 (08:49 -0300)]
AVRCP: fix loop over number of application settings
Luiz Augusto von Dentz [Wed, 5 Oct 2011 20:02:18 +0000 (23:02 +0300)]
Remove test-media-player
Luiz Augusto von Dentz [Wed, 5 Oct 2011 20:02:17 +0000 (23:02 +0300)]
Remove MediaPlayer interface from control-api.txt
Luiz Augusto von Dentz [Wed, 5 Oct 2011 20:02:16 +0000 (23:02 +0300)]
Add simple-player test script
Luiz Augusto von Dentz [Wed, 5 Oct 2011 20:02:15 +0000 (23:02 +0300)]
AVRCP: move MediaPlayer to adapter object
This move the MediaPlayer registration to adapter object on Media
interface so we can track players properly.
Claudio Takahasi [Tue, 4 Oct 2011 18:32:22 +0000 (15:32 -0300)]
Add automatic connect timeout config option
Add new option in main.conf allowing change the default automatic
connection timer. This value defines how many seconds re-connection
for bonded devices will be active when a platform/user event triggers
the automatic re-connections.
Anderson Briglia [Tue, 4 Oct 2011 18:32:16 +0000 (15:32 -0300)]
Enable re-connection if reason is Timeout
The re-connection timer must be added just when the disconnection reason
was "Connection timeout" for GATT based profiles.
Claudio Takahasi [Tue, 4 Oct 2011 18:32:04 +0000 (15:32 -0300)]
Add an interval between connection attempts
For connection attempts to the same remote device, add 5 seconds
interval until the next connect attempt. At the moment, the behaviour
depends on if address is found in the advertising kernel cache only.
Passive scanning kernel patches are not upstream yet. LE scanning will
be executed in background during a short period of time until it finds
the address or EHOSTDOWN is returned to the connection attempt.
Claudio Takahasi [Tue, 4 Oct 2011 18:31:54 +0000 (15:31 -0300)]
Set auto connect from maemo6 plugin
Inform the adapter that the system has been unlocked when the MCE
sends the tklock_mode_ind signal. This signal will trigger the
automatic re-connections for the devices selected by the profiles.
Profiles register ATTIO callbacks to indicate that ATT connection
is required.
Anderson Briglia [Tue, 4 Oct 2011 18:31:43 +0000 (15:31 -0300)]
Add display lock watcher on maemo6 plugin
Implements display status signal watcher in maemo6 plugin.
Claudio Takahasi [Tue, 4 Oct 2011 18:31:32 +0000 (15:31 -0300)]
Disable automatic connections after 60 seconds
Claudio Takahasi [Tue, 4 Oct 2011 18:31:21 +0000 (15:31 -0300)]
Fix repeated connection attempt to the same remote
Avoids queue dupplicated requests connects for the same device. Sources
can be triggered by auto connect or on demand connection request when a
given profile registers ATTIO connection callbacks.
Claudio Takahasi [Tue, 4 Oct 2011 18:31:09 +0000 (15:31 -0300)]
Add checking if profiles are requesting connection
Before triggering automatic ATTIO connections driven by platform event,
the device needs to check if there is at least one entry in the ATTIO
connection callback, meaning that there is profile requesting connection
and the state is auto connection.
Claudio Takahasi [Tue, 4 Oct 2011 18:30:57 +0000 (15:30 -0300)]
Add continuous connection attempt
If auto connect is enabled, queue another connection attempt until
the adapter sets auto connect to FALSE. The behaviour depends on if the
address is found in the advertising cache or not.
Claudio Takahasi [Tue, 4 Oct 2011 18:30:46 +0000 (15:30 -0300)]
Add set auto connect in device
Skeleton of automatic connections driven by platform/user event.
Two layers will manage connections: Profiles can request on demand
connections registering ATTIO connection callbacks(one attempt) for
a given device and platform/user action can trigger automatic
connections for devices with ATTIO callbacks registered.
Claudio Takahasi [Tue, 4 Oct 2011 18:30:29 +0000 (15:30 -0300)]
Remove timer to trigger connection attempts
Removes continuous timer for ATTIO connection attempts. A new approach
is being implemented managing scanning and connection attempts driven
by platform/user actions. eg: screen unlocked.
Luiz Augusto von Dentz [Wed, 5 Oct 2011 14:24:50 +0000 (17:24 +0300)]
Fix crash when remote connects to AVRCP without having a record
Device object may exist but control wont be initialized causing the
following crash:
Invalid read of size 8
at 0x12B510: state_changed (control.c:90)
by 0x12BA20: avctp_set_state (avctp.c:367)
by 0x12C0DC: avctp_confirm_cb (avctp.c:733)
by 0x166481: server_cb (btio.c:200)
by 0x4E75ADC: g_main_context_dispatch (in /lib64/libglib-2.0.so.0.3000.0)
by 0x4E762D7: ??? (in /lib64/libglib-2.0.so.0.3000.0)
by 0x4E76824: g_main_loop_run (in /lib64/libglib-2.0.so.0.3000.0)
by 0x11ED19: main (main.c:473)
Address 0x8 is not stack'd, malloc'd or (recently) free'd
Luiz Augusto von Dentz [Wed, 5 Oct 2011 14:24:30 +0000 (17:24 +0300)]
Fix not being able to register pdu handlers
This happens when removing and adding again an adapter
Johan Hedberg [Wed, 5 Oct 2011 12:28:08 +0000 (15:28 +0300)]
Fix missing initialization of A2DP error
Claudio Takahasi [Tue, 4 Oct 2011 17:52:23 +0000 (14:52 -0300)]
Minor cleanup in attrib server channel disconnect
Claudio Takahasi [Tue, 4 Oct 2011 17:50:28 +0000 (14:50 -0300)]
Add attrib server channel detach
BlueZ will act as GAP central role, so for outgoing connections the
central is responsible for disconnecting the link. This patch adds
a function allowing the central to detach from the local attribute
server(removing the last GAttrib reference).
Claudio Takahasi [Tue, 4 Oct 2011 17:22:43 +0000 (14:22 -0300)]
Emit LinkLossAlertLevel after writing the alert
Claudio Takahasi [Tue, 4 Oct 2011 17:22:42 +0000 (14:22 -0300)]
Fix wrong write GATT-subprocedure for Link Loss
According to Link Loss Service specification, Write Characteristic
Value sub-procedure should be used to change the Alert Level.
Luiz Augusto von Dentz [Mon, 3 Oct 2011 14:57:50 +0000 (17:57 +0300)]
Fix regression when disconnecting AVRCP
This prevent to disconnect AVRCP when doing e.g. Audio.Disconnect