Commit Graph

189 Commits

Author SHA1 Message Date
Elvis Pfutzenreuter
1effccc664 HDP: reject MDL reconnection with different MTU
This patch implements refusal of a MDL reconnection if the new L2CAP
connection presents a different MTU. Accordingly to HDP spec. item 3.5.

It aims to pass the TC_SNK_HCT_BV_07_C PTS test. (It does not pass yet
because PTS itself seems to have issues. See tickets 7212, 7214 and
7244 for details.)
2011-01-28 18:07:55 +02:00
Johan Hedberg
6b9921107e Get rid of unneeded btd_adapter_get_conn_handle function 2010-12-19 16:50:27 +02:00
Gustavo F. Padovan
696c18c48f Create btd_error_invalid_args()
DBus error handling in BlueZ is a mess. This is the first patch to unify
all DBus error handling like in ConnMan and oFono. This unifies all
.InvalidArguments errors.
2010-12-07 22:58:32 +02:00
Jose Antonio Santos Cadenas
d6523428ac Fix MDL and MCL reference counting in IO watchers
When a io_watcher is added to an MDL or an MCL channel, its reference
should be incremented because the watcher should keep its own reference
the the structure.

Also a destroy function is added in order to decrement the reference
once the watcher is removed.
2010-11-22 18:02:26 +01:00
Santiago Carot-Nemesio
d8e13154ce Do not increment mdl reference in reconnections 2010-11-22 15:34:19 +01:00
Johan Hedberg
fe743cc4b1 Fix C++ style comment 2010-11-18 17:03:10 +02:00
Jose Antonio Santos Cadenas
d99c3e454e Check if the mcl insiede the device is correctly set before use it 2010-11-18 16:56:28 +02:00
Santiago Carot-Nemesio
f6322e527e Check if MCAP Instance is already released when a callbacks comes back. 2010-11-18 16:56:28 +02:00
Jose Antonio Santos Cadenas
fb750fb7fd Fixes to echo 2010-11-18 16:56:27 +02:00
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
Jose Antonio Santos Cadenas
9079c27239 Fix segfault in HDP during device re-creation 2010-11-11 11:27:33 +02:00
Elvis Pfützenreuter
917449e1cd Check HealthApplication path before trying to destroy it 2010-11-11 11:26:19 +02:00
Elvis Pfützenreuter
1532898319 Add Application property to HealthChannel
This patch adds the Application property to HealthChannel, which
allows to unambiguously relate a channel to an application.

This property is useful when there are several processes interested
in accepting HealthChannels but device address is not sufficient
criteria to engage upon, or ignore, the ChannelConnected signal.
Having the application path allows to determine role and data type,
in the context of the process that has created that application.
2010-11-06 12:55:09 +02:00
Elvis Pfützenreuter
23de707dca Fix coding style and comment 2010-10-25 14:48:29 -04:00
Elvis Pfützenreuter
780dd75fcc Fix fd comparison 2010-10-25 14:48:27 -04:00
Santiago Carot-Nemesio
c1e72570fc Send a proper configuration when a source doesn't have a first reliable 2010-10-25 14:28:14 -02:00
Elvis Pfützenreuter
2200d976bd Fix small coding style issues
Based on http://lxr.linux.no/linux+v2.6.36/Documentation/CodingStyle#L171
2010-10-23 10:22:07 -02:00
Johan Hedberg
5ff302b070 Fix minor coding style issue with variable declarations 2010-10-22 11:42:51 -02:00
Jose Antonio Santos Cadenas
230410365e Check if the channel mode is correct when opening data channels 2010-10-21 09:44:58 +02:00
Santiago Carot-Nemesio
b55676bd78 Change data channel mode for incoming connections 2010-10-21 09:44:58 +02:00
Santiago Carot-Nemesio
6732965eb1 Enable support to change mode for incoming data channels connections 2010-10-21 09:44:58 +02:00
Jose Antonio Santos Cadenas
79a2209f6b Delete data channels when their device is removed. 2010-10-21 09:44:16 +02:00
Santiago Carot-Nemesio
f0e40f4c1d Close the data channel if remote side changes the configuration 2010-10-21 09:44:12 +02:00
Santiago Carot-Nemesio
9c2b1e31ae Check l2cap configuration when data channels are connected 2010-10-21 09:44:12 +02:00
Santiago Carot-Nemesio
9d58e78220 Fix segmentation fault freeing uninitialized pointers 2010-10-21 09:44:12 +02:00
Jose Antonio Santos Cadenas
0d716b0751 Emit a valid path when main channel is deleted 2010-10-21 09:44:12 +02:00
Jose Antonio Santos Cadenas
549bc07502 Notify main channel when it is locally opened 2010-10-21 09:44:12 +02:00
Santiago Carot-Nemesio
a0da5dee55 Remove obsolete comment from MCAP 2010-10-21 09:44:12 +02:00
Jose Antonio Santos Cadenas
8838517cbf Receive an string instead of an integer for ChannelType 2010-10-21 09:43:49 +02:00
Santiago Carot-Nemesio
2a555d5d35 Remove unnecessary function 2010-10-14 12:50:54 +02:00
Santiago Carot-Nemesio
860f095113 Remove MDL when delete operation fails with INVALID_MDLID error
We can remove a data channel if error code Invalid MDLID is provided
in reply to a MD_DELETE_MDL_REQ. That error is provided only if the
MDL ID referenced is invalid. This shall be used when:
- A reserved or invalid value for MDL ID was used.
- The MDL ID referenced is not available (was never created, has
been deleted, or was otherwise lost),
- The MDL ID referenced in the Abort request is not the same value
that was used to initiate the PENDING state
2010-10-14 12:50:54 +02:00
Santiago Carot-Nemesio
d44b6e979b Abort echo channel if connection was not successful 2010-10-14 12:50:54 +02:00
Jose Antonio Santos Cadenas
70558ff3fb Add initial support for deleting an echo channel 2010-10-14 12:50:54 +02:00
Santiago Carot-Nemesio
214b368c74 Add timeout to wait for echo reply 2010-10-14 12:50:54 +02:00
Jose Antonio Santos Cadenas
02b32c2216 Separate private echo data from data channels 2010-10-14 12:50:54 +02:00