OSDN Git Service
Ido Yariv [Mon, 28 May 2012 18:33:05 +0000 (21:33 +0300)]
attrib-server: Allow zero length attribute update
attrib_db_update always fails when g_try_realloc returns NULL, not
taking into account that the length passed to g_try_realloc could be
zero. In this case, g_try_realloc frees the currently allocated memory
and returns NULL.
As a result, not only will attrib_db_update fail needlessly, a
use-after-free could occur as the attribute's length will still hold the
length of the freed buffer.
Fix this by only returning an error if the length is non-zero.
Luiz Augusto von Dentz [Mon, 28 May 2012 11:16:48 +0000 (14:16 +0300)]
AVRCP: Fix not registering to VolumeChanged event again when notified
The spec says:
"A registered notification gets changed on receiving CHANGED event
notification. For a new notification additional NOTIFY command is
expected to be sent."
Luiz Augusto von Dentz [Fri, 25 May 2012 15:02:48 +0000 (18:02 +0300)]
audio: Add Volume property to A2DP transport GetProperties
Now that volume is being handled by SetProperty it should also be
available in GetProperties.
Luiz Augusto von Dentz [Fri, 25 May 2012 15:02:47 +0000 (18:02 +0300)]
AVRCP: Add support for sending SetAbsoluteVolume
Once the transport volume is changed update the remote volume by sending
SetAbsoluteVolume:
< AVCTP: Command : pt 0x00 transaction 9 pid 0x110e
AV/C: Changed: address 0x48 opcode 0x00
Subunit: Panel
Opcode: Vendor Dependent
Company ID: 0x001958
AVRCP: SetAbsoluteVolume: pt Single len 0x0001
Volume: 100.00% (127/127)
> AVCTP: Response : pt 0x00 transaction 9 pid 0x110e
AV/C: Accepted: address 0x48 opcode 0x00
Subunit: Panel
Opcode: Vendor Dependent
Company ID: 0x001958
AVRCP: SetAbsoluteVolume: pt Single len 0x0001
Volume: 100.00% (127/127)
Luiz Augusto von Dentz [Fri, 25 May 2012 15:02:46 +0000 (18:02 +0300)]
audio: Fix signature type for transport Volume
Signature is now uint16 instead of byte
Luiz Augusto von Dentz [Fri, 25 May 2012 15:02:45 +0000 (18:02 +0300)]
audio: Fix updating volume property for non-A2DP transports
Volume property is A2DP only
Luiz Augusto von Dentz [Fri, 25 May 2012 15:02:43 +0000 (18:02 +0300)]
AVRCP: Fix initializing volume before checking PDU type
Response may be rejected or not implemented so the operand used to
initialize the variable may not even exist.
Szymon Janc [Fri, 25 May 2012 14:21:02 +0000 (16:21 +0200)]
SAP: Remove not needed checks from disconnect_ind
disconnect_ind is an helper funtion and is always called with valid
connection and from valid state so there is no need to double check
that.
Szymon Janc [Fri, 25 May 2012 14:21:01 +0000 (16:21 +0200)]
sap-dummy: Fix DBus connection leak if interface registration failed
If DBus interface registration failed dbus connection should be
unreferenced.
Szymon Janc [Fri, 25 May 2012 14:21:00 +0000 (16:21 +0200)]
SAP: Remove one line of indentation in sap_io_destroy
Szymon Janc [Fri, 25 May 2012 14:20:59 +0000 (16:20 +0200)]
SAP: Remove not needed src field from struct sap_server
src is only used in sap_server_register, no need to keep in memory for
SAP session duration.
Szymon Janc [Fri, 25 May 2012 14:20:58 +0000 (16:20 +0200)]
SAP: Remove not needed includes
Szymon Janc [Fri, 25 May 2012 14:20:57 +0000 (16:20 +0200)]
sap-dummy: Remove not needed includes
Szymon Janc [Fri, 25 May 2012 14:20:56 +0000 (16:20 +0200)]
sap-dummy: Small refactor to sap_connect_req
This makes function easier to read and more similar to rest of code.
Szymon Janc [Fri, 25 May 2012 14:20:55 +0000 (16:20 +0200)]
sap-dummy: Use constants when setting ongoing call status
This improves readbility of whan new ongoing call status is being set.
Szymon Janc [Fri, 25 May 2012 14:20:54 +0000 (16:20 +0200)]
SAP: Fix some code style issue
Szymon Janc [Fri, 25 May 2012 14:20:53 +0000 (16:20 +0200)]
SAP: Remove not needed NULL pointer check in check_msg
Buffer passed to check_msg() is always valid.
Tom Gundersen [Sat, 26 May 2012 23:07:57 +0000 (01:07 +0200)]
udev: remove deprecated function
This function has in the past returned "/sys" unconditionally. As of
udev-183 it is gone, so just replace it with the string.
Paulo Alcantara [Sun, 27 May 2012 00:40:54 +0000 (21:40 -0300)]
storage: Rename appearance file to appearances
This patch renames the "appearance" file to "appearances" to be more
suitable with its content.
Claudio Takahasi [Sun, 27 May 2012 00:40:53 +0000 (21:40 -0300)]
storage: Rename primary file to primaries
This patch renames the "primary" file to "primaries" to be more suitable
with its content.
Claudio Takahasi [Sun, 27 May 2012 00:40:52 +0000 (21:40 -0300)]
storage: Rename characteristic to characteristics
This patch renames the "characteristic" file to "characteristics" to be
more suitable with its content.
Paulo Alcantara [Sun, 27 May 2012 00:40:51 +0000 (21:40 -0300)]
storage: Store address type in "attributes" file
Addressing types can be either BR/EDR, BLE public or BLE random so the
entries in the "attributes" file did not contain enough information to
distinguish which addressing type it's supposed to be. Entries will now
contain both address number and address type as a single key in every
entry in the file.
Paulo Alcantara [Sun, 27 May 2012 00:40:50 +0000 (21:40 -0300)]
core: Fix creating device from "longtermkeys" file
Paulo Alcantara [Sun, 27 May 2012 00:40:49 +0000 (21:40 -0300)]
storage: Store address type in "longtermkeys" file
Addressing types can be either BR/EDR, BLE public or BLE random so the
entries in the "longtermkeys" file did not contain enough information to
distinguish which addressing type it's supposed to be. Entries will now
contain both address number and address type as a single key in every
entry in the file.
Paulo Alcantara [Sun, 27 May 2012 00:40:48 +0000 (21:40 -0300)]
storage: Store address type in "ccc" file
Addressing types can be either BR/EDR, BLE public or BLE random so
the entries in the "ccc" file did not contain enough information to
distinguish which addressing type it's supposed to be. Entries will
now contain both address number and address type as a single key in
every entry in the file.
Paulo Alcantara [Sun, 27 May 2012 00:40:47 +0000 (21:40 -0300)]
storage: Store address type in "appearance" file
BLE addressing types can be either public or random so the entries in
the "appearance" file did not contain enough information to distinguish
which addressing type it's supposed to be (LE public or LE random).
Appearance is an information related to BLE device only. Entries will
now contain both BLE address number and BLE address type as a single key
in every entry in the file.
Paulo Alcantara [Sun, 27 May 2012 00:40:46 +0000 (21:40 -0300)]
storage: Store address type in "characteristics"
GATT can use BR/EDR or BLE as transport. Addressing types can be either
BR/EDR, BLE public or BLE random so the entries in the "characteristics"
file did not contain enough information to distinguish which addressing
type it's supposed to be. Entries will now contain both address number
and address type as a single key in every entry in the file.
Lucas De Marchi [Thu, 24 May 2012 17:26:25 +0000 (14:26 -0300)]
AVRCP: Remove unneeded check for set_volume callback
Luiz Augusto von Dentz [Thu, 24 May 2012 13:22:48 +0000 (16:22 +0300)]
media-api: Update documentation to include Volume property
Luiz Augusto von Dentz [Thu, 24 May 2012 13:22:47 +0000 (16:22 +0300)]
AVRCP: Fix not setting audio device connected to player
While connecting device should be set to match the AVCTP session and when
disconnected reset it back to NULL.
Luiz Augusto von Dentz [Thu, 24 May 2012 13:22:46 +0000 (16:22 +0300)]
AVCTP: Fix setting wrong transaction id expected for responses
The id were incremented after being set to the request so it is always
+1 of the actual transaction.
Syam Sidhardhan [Wed, 23 May 2012 15:57:32 +0000 (21:27 +0530)]
input: Remove unwanted codes from device
Here the variable iconn never be NULL, so no need to check it
against NULL.
Syam Sidhardhan [Wed, 23 May 2012 15:57:31 +0000 (21:27 +0530)]
audio: Remove unwanted code from manager
Here the variable adp never be NULL, so no need to check it
against NULL.
Johan Hedberg [Thu, 24 May 2012 08:08:30 +0000 (11:08 +0300)]
core: Remove unnecessary agent variable
Syam Sidhardhan [Wed, 23 May 2012 15:57:30 +0000 (21:27 +0530)]
adapter: Remove unwanted if check and code
Here the variable agent never be NULL, so no need to check it
against NULL.
Syam Sidhardhan [Wed, 23 May 2012 15:57:29 +0000 (21:27 +0530)]
avctp: Fix NULL check after dereference
Check for session != NULL has to be done before accessing session.
Syam Sidhardhan [Wed, 23 May 2012 15:57:28 +0000 (21:27 +0530)]
Remove redundant D-Bus error initilization in maemo6 plugin
Syam Sidhardhan [Wed, 23 May 2012 15:57:27 +0000 (21:27 +0530)]
agent: Remove redundant D-Bus error initilizations
Syam Sidhardhan [Wed, 23 May 2012 15:57:23 +0000 (21:27 +0530)]
media: Remove redundant D-Bus error initilization
Syam Sidhardhan [Wed, 23 May 2012 15:57:22 +0000 (21:27 +0530)]
storage: Use g_free() instead of free()
It is important to match g_*() memory allocation with g_free()
Syam Sidhardhan [Wed, 23 May 2012 15:57:21 +0000 (21:27 +0530)]
monitor: Fix memory leak
Arek Lichwa [Tue, 22 May 2012 12:21:34 +0000 (14:21 +0200)]
sdp/build: Build fails when SDP_DEBUG enabled
Enabling SDP_DEBUG prevents build to be done.
Paulo Alcantara [Tue, 22 May 2012 19:45:27 +0000 (16:45 -0300)]
core: Fix removing device services from "primary" file
The BLE address type needs to be passed as parameter in
delete_device_service() function in order to remove a device from
"primary" file. This is why the entries in "primary" file will be using
the new storage format.
Claudio Takahasi [Tue, 22 May 2012 19:45:26 +0000 (16:45 -0300)]
core: Fix creating device from "primary" file
This patch removes the hard-coded address type for the BLE device
created from the storage.
Paulo Alcantara [Tue, 22 May 2012 19:45:25 +0000 (16:45 -0300)]
storage: Store BLE address type in "primary" file
BLE addressing types can be either public or random so the entries in
the "primary" file did not contain enough information to distinguish
which addressing type it's supposed to be (LE public or LE random).
Entries will now contain both BLE address number and BLE address type
as a single key in every entry in the file.
Marcel Holtmann [Tue, 22 May 2012 18:29:27 +0000 (20:29 +0200)]
audio: Change the file mode back to 644
Mikel Astiz [Tue, 22 May 2012 14:58:18 +0000 (16:58 +0200)]
gdbus: Fix incorrectly discarded signals
Signals with no arguments were incorrectly filtered out due to the NULL
inequality check.
Luiz Augusto von Dentz [Tue, 22 May 2012 13:30:04 +0000 (16:30 +0300)]
audio: Fix media transport creation for gateway endpoints
The device maybe connected to another adapter other than the endpoint's
so the adapters must be first check.
Frédéric Danis [Mon, 21 May 2012 15:31:27 +0000 (17:31 +0200)]
audio: Fix media transport creation
Prevents set_configuration() to be called on another adapter
than connecting one
Anderson Lizardo [Fri, 18 May 2012 13:46:29 +0000 (09:46 -0400)]
avdtp: Fix incorrect gchar buffer allocation
The code was allocating an array of gchar pointers, where an array of
gchar is expected.
Joohi Rastogi [Tue, 22 May 2012 03:25:47 +0000 (08:55 +0530)]
AVRCP: Add missing Player Setting feature in TG record
Joohi Rastogi [Mon, 21 May 2012 11:48:09 +0000 (17:18 +0530)]
AVRCP: Refactor the code using constants
Anderson Lizardo [Fri, 18 May 2012 20:33:03 +0000 (16:33 -0400)]
sdp: Remove unnecessary memset()
The memory referenced by "u" pointer is initialized right after the
memset() call.
Luiz Augusto von Dentz [Fri, 18 May 2012 16:11:44 +0000 (19:11 +0300)]
AVRCP: Bump TG record to 1.4
The only mandatory feature for 1.4 is absolute volume control which is
now supported.
Luiz Augusto von Dentz [Fri, 18 May 2012 16:11:43 +0000 (19:11 +0300)]
AVRCP: Subscribe for VolumeChanged Notification
If the remote device support version 1.4 or latter send register command
for VolumeChanged event:
< AVCTP: Command : pt 0x00 transaction 0 pid 0x110e
AV/C: Notify: address 0x48 opcode 0x00
Subunit: Panel
Opcode: Vendor Dependent
Company ID: 0x001958
AVRCP: RegisterNotification: pt Single len 0x0005
EventID: 0x0d (EVENT_VOLUME_CHANGED)
Interval: 0x00000000 (0 seconds)
> AVCTP: Response : pt 0x00 transaction 0 pid 0x110e
AV/C: Interim: address 0x48 opcode 0x00
Subunit: Panel
Opcode: Vendor Dependent
Company ID: 0x001958
AVRCP: RegisterNotification: pt Single len 0x0002
EventID: 0x0d (EVENT_VOLUME_CHANGED)
Volume: 100.00% (127/127)
Luiz Augusto von Dentz [Fri, 18 May 2012 16:11:42 +0000 (19:11 +0300)]
AVRCP: Add define for VolumeChanged event
Johan Hedberg [Fri, 18 May 2012 17:25:45 +0000 (20:25 +0300)]
sdp: Fix removing servers own record
To avoid misbehaving plugins trying to remove handle 0 it's better to
directly check for this and return EINVAL.
Lucas De Marchi [Fri, 18 May 2012 03:23:37 +0000 (00:23 -0300)]
adapter: do not check signature twice
Message signature is already checked in generic_message(), so there's no
need to check again in the callback.
Lucas De Marchi [Fri, 18 May 2012 03:23:36 +0000 (00:23 -0300)]
gdbus: do not check signature twice
Message signature is already checked in generic_message(), so there's no
need to check again in the callback.
Lucas De Marchi [Fri, 18 May 2012 03:23:35 +0000 (00:23 -0300)]
gdbus: add Method.NoReply annotation in introspection
Lucas De Marchi [Fri, 18 May 2012 03:23:34 +0000 (00:23 -0300)]
gdbus: add Deprecated annotation in introspection
Lucas De Marchi [Fri, 18 May 2012 03:23:33 +0000 (00:23 -0300)]
gdbus: remove signature and reply from tables
Lucas De Marchi [Fri, 18 May 2012 03:23:32 +0000 (00:23 -0300)]
Do not set signature and reply in GDBus tables
Use GDBUS_* macros, so signature and reply fields are not set in each
method/signal.
Lucas De Marchi [Fri, 18 May 2012 03:23:31 +0000 (00:23 -0300)]
gdbus: loop over args to check message signature
Lucas De Marchi [Fri, 18 May 2012 03:23:30 +0000 (00:23 -0300)]
gdbus: use GDBusArgInfo to generate introspection
By using GDBusArgInfo in methods and signals, the introspection
generation is much simpler and we can add each argument name.
Lucas De Marchi [Fri, 18 May 2012 03:23:29 +0000 (00:23 -0300)]
Convert GDBus methods to use macro helpers
With these macro helpers we can separate in/out arguments and use their
own vector.
Lucas De Marchi [Fri, 18 May 2012 03:23:28 +0000 (00:23 -0300)]
gdbus: add and use helpers for table declarations
Lucas De Marchi [Fri, 18 May 2012 03:23:27 +0000 (00:23 -0300)]
gdbus: add argument info to methods and signals
Lucas De Marchi [Fri, 18 May 2012 03:23:26 +0000 (00:23 -0300)]
Constify GDBus signal tables
Constify signal tables with the following command:
find . -name '*.[ch]' -exec \
sed -i 's/\(GDBusSignalTable .* =\)/const \1/g' {} \;
Lucas De Marchi [Fri, 18 May 2012 03:23:25 +0000 (00:23 -0300)]
Constify GDBus method tables
Constify method tables with the following command:
find . -name '*.[ch]' -exec \
sed -i 's/\(GDBusMethodTable .* =\)/const \1/g' {} \;
Marcel Holtmann [Fri, 18 May 2012 02:56:27 +0000 (19:56 -0700)]
gdbus: Constify introspection method table
Lucas De Marchi [Thu, 17 May 2012 18:19:59 +0000 (15:19 -0300)]
gdbus: do not call memset for terminating NUL
Lucas De Marchi [Thu, 17 May 2012 18:19:58 +0000 (15:19 -0300)]
gdbus: return if method signature is malformed
Alex Elsayed [Thu, 17 May 2012 17:00:27 +0000 (10:00 -0700)]
Add dbus service file that references the systemd unit
This allows bluez to be bus-activated.
Johan Hedberg [Wed, 16 May 2012 10:07:09 +0000 (13:07 +0300)]
hciemu: Fix gcc 4.7 compilation error
This patch fixes the following compilation error with gcc 4.7:
CC test/hciemu.o
test/hciemu.c: In function 'getbdaddrbyname':
test/hciemu.c:1115:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
Lucas De Marchi [Wed, 16 May 2012 12:26:24 +0000 (09:26 -0300)]
doc: Update possible values of Agent capabilities
Anderson Lizardo [Fri, 11 May 2012 13:09:29 +0000 (09:09 -0400)]
adapter: Remove dead code from set_property()
Lucas De Marchi [Wed, 9 May 2012 12:06:17 +0000 (09:06 -0300)]
build: Do not set CFLAGS/LDFLAGS directly
Set a separate variable for adding warning flags, optimization, etc.
Build systems are not supposed to change CFLAGS and LDFLAGS, these are
user variables.
Doing so we guarantee CFLAGS and LDFLAGS from environment is appended
to the flags used during build. One useful use-case is to temporarily
disable -Werror when using --enable-maintainer-mode, without completely
loosing the warning flags and other parameters in CFLAGS (like -fPIC).
Without this patch, fiddling with CFLAGS/LDFLAGS after configure may
result in errors like below:
/usr/bin/ld: tools/rfcomm.o: relocation R_X86_64_32 against `.bss' can
not be used when making a shared object; recompile with -fPIC
tools/rfcomm.o: could not read symbols: Bad value
collect2: error: ld returned 1 exit status
make[1]: *** [tools/rfcomm] Error 1
make: *** [all] Error 2
Reference: http://www.gnu.org/software/automake/manual/html_node/Flag-Variables-Ordering.html
Lucas De Marchi [Wed, 9 May 2012 12:06:16 +0000 (09:06 -0300)]
build: Fix typo in AM_CFLAGS
Vishal Agarwal [Thu, 10 May 2012 13:43:47 +0000 (19:13 +0530)]
textfile: fix missing call to munmap in wite_key
In some cases it was possible that munmap is not called corresponding
to mmap, which might result in future read or writes to fail.
Andrei Emeltchenko [Thu, 10 May 2012 08:08:51 +0000 (11:08 +0300)]
lib: Add definitions for AMP Assoc data
Definitions are needed for decoding A2MP Assoc Rsp.
Paulo Alcantara [Fri, 11 May 2012 15:45:35 +0000 (12:45 -0300)]
core: Remove unused variable
"srcaddr" variable is not used for anything else in
btd_event_remote_name() function. So, remove it for now.
Tedd Ho-Jeong An [Tue, 15 May 2012 17:23:29 +0000 (10:23 -0700)]
hciattach: Add support for Intel Bluetooth device
This patch enables the Intel Bluetooth device (UART sku) over the H4
protocol. It is responsible for bring up the device into known state by
configuring the baudrate and applying the patches, if required.
Chen Ganir [Wed, 9 May 2012 09:21:15 +0000 (12:21 +0300)]
eir: Keep parsed eir_data on error
Do not discard already parsed eir_data on eir data length error.
Data corruption may occur, but this does not mean that we need
to ignore already parsed valid eir data.
Gustavo Padovan [Fri, 11 May 2012 16:18:49 +0000 (13:18 -0300)]
monitor: remove extra black line
Anderson Lizardo [Fri, 27 Apr 2012 14:36:52 +0000 (10:36 -0400)]
hidd: Fix indentation
Anderson Lizardo [Fri, 27 Apr 2012 14:36:51 +0000 (10:36 -0400)]
audio: Fix tab misuse
Anderson Lizardo [Fri, 27 Apr 2012 14:36:50 +0000 (10:36 -0400)]
deviceinfo: Fix indentation and tab misuse
Anderson Lizardo [Fri, 27 Apr 2012 14:36:49 +0000 (10:36 -0400)]
monitor: Fix tab misuse
Anderson Lizardo [Fri, 27 Apr 2012 14:36:48 +0000 (10:36 -0400)]
sap: Fix tab misuse
Anderson Lizardo [Fri, 27 Apr 2012 14:36:47 +0000 (10:36 -0400)]
device: Fix tab misuse
Anderson Lizardo [Fri, 27 Apr 2012 14:36:46 +0000 (10:36 -0400)]
event: Fix tab misuse
Anderson Lizardo [Fri, 27 Apr 2012 14:36:45 +0000 (10:36 -0400)]
tools: Fix tab misuse
Anderson Lizardo [Fri, 27 Apr 2012 14:36:44 +0000 (10:36 -0400)]
lib: Fix tab misuse
Johan Hovold [Fri, 27 Apr 2012 13:03:58 +0000 (15:03 +0200)]
csr_bcsp: fix link establishment
The current link-establishment implementation times out if a packet is
not received after the link is active (i.e. reception of CONF_RESP).
Fix by making sure that the link establishment loop in open is
terminated when ubcsp sets the UBCSP_PACKET_SENT flag (on reception of
CONF_RESP) rather than UBCSP_PACKET_RECEIVED (on reception of any later
packages).
Tom Gundersen [Thu, 3 May 2012 22:21:53 +0000 (00:21 +0200)]
udev: remove udev activation of the blutooth daemon
Udev is not meant to spawn long-running processes, and as of the next
udev version such processes will be killed.
If using systemd, device activation can be used to get the same effect.
On Arch we have been disabling this rule for a long time, even though we
don't use systemd, as it was causing more problems than it was worth.
Tom Gundersen [Thu, 3 May 2012 22:21:52 +0000 (00:21 +0200)]
systemd: don't order against syslog.target
This was only needed in old versions of systemd. All messages are logged
by default to the journal now, no ordering required.
Gustavo Padovan [Fri, 4 May 2012 02:01:19 +0000 (23:01 -0300)]
input: increase security level of the connection
Andrzej Kaczmarek [Mon, 7 May 2012 13:09:02 +0000 (15:09 +0200)]
gatttool: Add option to specify LE address type
This patch makes possible to specify LE address type.
After advertising cache was removed from kernel we should always specify
address type for LE link when calling bt_io_connect() as otherwise random
will always be used.
LE address type can be specified either by 'addr-type' or 't' command line
parameter or as additional parameter to 'connect' command in interactive mode.
Possible values are 'public' (default) and 'random'.
Mikel Astiz [Fri, 4 May 2012 13:14:40 +0000 (15:14 +0200)]
media: Enable parallel requests to endpoint
If endpoint is handling several devices, it should be able to handle
multiple requests, one per each.