Commit Graph

7759 Commits

Author SHA1 Message Date
Jose Antonio Santos Cadenas
0c17e36816 Remove magic number to check ECHO MDEPs in HDP 2010-11-18 16:56:27 +02:00
Santiago Carot-Nemesio
59d99d4967 Return proper response code if there is an error creating echo channel 2010-11-18 16:56:27 +02:00
Santiago Carot-Nemesio
1242e834f3 Fix dereference to NULL pointers during data channels creation 2010-11-18 16:56:27 +02:00
Santiago Carot-Nemesio
aabc01126b Code refactorization in MCAP 2010-11-18 16:56:27 +02:00
Santiago Carot-Nemesio
36fcf8eb22 Remove old reference to mcap session in the name of variables 2010-11-18 16:56:27 +02:00
Santiago Carot-Nemesio
bcfaa65382 Add reference counter to mcap_mdl 2010-11-18 16:56:27 +02:00
Jose Antonio Santos Cadenas
0ddd53f98b Fix message error 2010-11-18 16:56:27 +02:00
Jose Antonio Santos Cadenas
f8a4a4cdb0 Set reference counter for mcls to gint 2010-11-18 16:56:27 +02:00
Santiago Carot-Nemesio
5128b0a92d Add reference counter to mcap_instances 2010-11-18 16:56:27 +02:00
Jose Antonio Santos Cadenas
cd11da5416 Fix typos in mcap 2010-11-18 16:56:27 +02:00
Jose Antonio Santos Cadenas
f85d904483 Notify a channel deleted when remote side has already deleted it 2010-11-18 16:56:27 +02:00
Santiago Carot-Nemesio
f2aa76f965 Add missed unrefs for hdp_tmp_dc_data 2010-11-18 16:56:27 +02:00
Santiago Carot-Nemesio
b3a6653367 Remove MCL's before removing the application
If you do in the other way you will find freed memory while
removing the mcl.
2010-11-18 16:56:26 +02:00
Jose Antonio Santos Cadenas
f472779b77 Add reference counter to hdp_channel 2010-11-18 16:56:26 +02:00
Santiago Carot-Nemesio
8cc8784b8f Add reference counter to hdp_device 2010-11-18 16:56:26 +02:00
Jose Antonio Santos Cadenas
fda9a5a1bc Add reference counter to hdp_application 2010-11-18 16:56:26 +02:00
Bruna Moreira
b0d8865493 Implement Find by Type request encode/decoding 2010-11-18 16:44:19 +02:00
Bruna Moreira
d23b28b125 Emit "DeviceFound" signal for LE devices
The adapter_emit_device_found() function was modified to emit
DeviceFound signal for LE devices as well.
2010-11-18 16:43:27 +02:00
Bruna Moreira
a42136ad9d Extract service UUIDs from advertising data
Make get_eir_uuids() return a GSList of strings, so it can be reused to
extract UUIDs from LE advertising data. The bt_strlist2array() helper
function was created to convert a GSList into a plain array of strings
(needed to send through D-Bus).
2010-11-18 16:39:16 +02:00
Bruna Moreira
43419be2e9 Advertising data: extract local name
Move extract_eir_name() to glib-helper.c file and rename function to
bt_extract_eir_name(). The local name is extracted from the advertising
data.
2010-11-18 14:31:52 +02:00
Sheldon Demario
e55509e013 Adding a new option to specify security level for gatttool 2010-11-18 14:20:11 +02:00
Johan Hedberg
684b1d3be1 hciops: fix encryption request
hciops_encrypt_link() was not working because it interfered with the
event filters of the hciops internal socket. Instead a separate socket
opened with hci_open_dev() needs to be used.
2010-11-18 08:40:49 +00:00
Jose Antonio Santos Cadenas
8ef7154868 Fix typos in adapter documentation 2010-11-16 13:39:43 +00:00
Bruna Moreira
e430998efb Initial advertising data parsing implementation
Implement adapter_update_adv() function to parse advertising data
received by btd_event_adv() function. Add some fields for advertising
data in remote_device_info struct.
2010-11-15 14:05:54 +00:00
Johan Hedberg
9d2bd07065 Fix signedness issue with set_class error checking 2010-11-12 23:34:16 +02:00
Johan Hedberg
303c0fd453 Remove non-existent function declaration 2010-11-12 23:19:45 +02:00
Johan Hedberg
57cbf3d072 Fix local name handling
A name variable of 248 bytes can't be passed to functions that expect it
to be nul-terminated (since if the name is exactly 248 bytes it wont
be). This patch fixes the name to always be stored in a 249 byte
variable where the last byte is always zero.
2010-11-12 23:10:55 +02:00
Johan Hedberg
19084de6a6 Clean up adapter_update_local_name API 2010-11-12 23:04:47 +02:00
Johan Hedberg
e47f4351bc Clean up EIR TX power handling 2010-11-12 22:40:18 +02:00
Johan Hedberg
ff20105684 Remove non-existent function declaration 2010-11-12 22:27:10 +02:00
Johan Hedberg
af56f3b6d5 Get rid of event.c wrapper for SSP mode read event 2010-11-12 22:25:50 +02:00
Johan Hedberg
bd7f8939b5 Move local name reading into hciops 2010-11-12 22:15:03 +02:00
Johan Hedberg
7afa48dcf3 Move SSP mode reading into hciops
Since the only thing the code does upon a write_ssp_mode_complete event
is issue a read_ssp_mode command it makes sense to have this internal to
hciops.
2010-11-12 22:01:38 +02:00
Johan Hedberg
be49c2621d Move SSP mode setting into hciops 2010-11-12 21:41:48 +02:00
Johan Hedberg
b8486f046a Move more hciops specific functionality into hciops
Several adapter initialization features will be handled by the new
management interface in the future, so move these from adapter.c into
hciops. This also gets rid of a couple of unnecessary adapter_ops
callbacks.
2010-11-12 18:37:40 +02:00
Johan Hedberg
6429d27b42 Don't cache the local name until it's actually used for something
This saves 248 bytes per adapter until there's actually some code that
might need the cache.
2010-11-12 18:04:36 +02:00
Johan Hedberg
fa472e0c70 hciops: wait for read_local_name complete in adapter init
To avoid clashes with name reads and writes in the core daemon it's
better to wait for the name read command that the kernel sends upon
init.
2010-11-12 17:46:37 +02:00
Johan Hedberg
f676fe7731 Remove misleading error log
It's normal for the adapter to have BDADDR_ANY in the early stages of
initialization so don't log anything about this to avoid confusion.
2010-11-12 14:47:16 +02:00
Johan Hedberg
be3d4f5e4c hciops: fix adapter initialization to wait for kernel HCI commands
The kernel sends several HCI commands when initializing an adapter and
several of them are important for the current adapter_start function. So
far only the local address was waited for, but it also makes sense to
wait for local version and features. This patch adds a bitmask to track
the completed commands and only informs adapter.c about readyness when
all commands have been completed.
2010-11-12 14:45:24 +02:00
Claudio Takahasi
3ef2b1cae6 Fix interleave discovery regression
Command complete event for LE commands are not being handled properly
due blocking calls of LE Set Scan Parameters and LE Set Scan Enable
Commands. Fix wrong Discovering signal emission in the interleaved
discovery mode.
2010-11-11 23:16:39 +02:00
Bruna Moreira
55354dc434 Refactor adapter_update_found_devices() function
The common code from adapter_update_found_devices() was moved to
update_found_devices().
2010-11-11 23:05:59 +02:00
Anderson Lizardo
e412b1b304 Refactor get_eir_uuids() to get EIR data length parameter
get_eir_uuids() will be reused to parse LE advertising data as well, as
they share the same format. But for Advertising, maximum data length is
different (31 bytes vs. 240 bytes for EIR), and the radio is not
required to send the non-significant (zero-filled) bytes.

adapter_emit_device_found() now also accepts a EIR data length
parameter, so it can be reused for LE and can propagate the exact data
length.
2010-11-11 23:02:30 +02:00
Bruna Moreira
2b3e61edbb Fix invalid memory access when EIR field length is zero 2010-11-11 22:57:21 +02:00
Luiz Augusto von Dentz
52244fb2dc Fix test-attrib not being listed in EXTRA_DIST 2010-11-11 16:22:41 +02:00
Claudio Takahasi
85d533a33b Add a new configuration option to disable Low Energy support
Disable LE interleave discovery and attribute server over LE link.
Option required to force disabling Low energy support for LE capable
adapters.
2010-11-11 15:28:21 +02:00
Siarhei Siamashka
01084686e1 sbc: added "cc" to the clobber list of mmx inline assembly
In the case of scale factors calculation optimizations, the inline
assembly code has instructions which update flags register, but
"cc" was not mentioned in the clobber list. When optimizing code,
gcc theoretically is allowed to do a comparison before the inline
assembly block, and a conditional branch after it which would lead
to a problem if the flags register gets clobbered. While this is
apparently not happening in practice with the current versions of
gcc, the clobber list needs to be corrected.

Regarding the other inline assembly blocks. While most likely it
is actually unnecessary based on quick review, "cc" is also added
there to the clobber list because it should have no impact on
performance in practice. It's kind of cargo cult, but relieves
us from the need to track the potential updates of flags register
in all these places.
2010-11-11 15:06:41 +02:00
Johan Hedberg
bffa2d625c Fix minor whitespace issue 2010-11-11 12:37:18 +02:00
Luiz Augusto von Dentz
87b3cb4de0 Fix not aborting sink stream configuration on disconnect
If stream configuration is not complete it should be aborted so we can
proceed with disconnection process.
2010-11-11 12:35:13 +02:00
Luiz Augusto von Dentz
ed5c9a308e Remove a2dp setup callbacks after they return
Since the callback won't be ever called again it make no sense to keep
them, also this cause a2dp_cancel to assume there are still some pending
callbacks to be processed and do not abort when it should.
2010-11-11 12:35:10 +02:00
Claudio Takahasi
1c00d83937 Fix possible memory leak of the GIOChannel in the attribute server 2010-11-11 12:09:21 +02:00