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
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
6732965eb1
Enable support to change mode for incoming data channels connections
2010-10-21 09:44:58 +02:00
Santiago Carot-Nemesio
a0da5dee55
Remove obsolete comment from MCAP
2010-10-21 09:44:12 +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
Jose Antonio Santos Cadenas
3913704e8f
Incoming connection in control channel should be ERTM
2010-10-12 11:10:28 +01:00
Jose Antonio Santos Cadenas
10bb87731c
Set the MCAP control channel mode to ERTM
2010-10-06 10:37:08 +02:00
Jose Antonio Santos Cadenas
aa2eeb07ee
mcap_connect_mcl receives the mode of the channel instead of the btiotype
2010-10-06 10:37:08 +02:00
Santiago Carot-Nemesio
c8c4f6445b
Fix MCAP bug when a new request is done in a callback
2010-10-06 10:37:07 +02:00
Santiago Carot-Nemesio
0a39787183
Fix potential memory leak in MCAP code
...
Data provided by profiles using MCAP may fall in memory leak if
control channel is closed before reply arrives from remote side.
This patch add a GDestroyNotify function parameter in MCAP API
to release private data provided by upper layers even if adapter
is removed or control channels is closed before reply from remote
side arrives.
2010-10-06 10:37:07 +02:00
Santiago Carot-Nemesio
92f12fb6fa
Add GDestroyNotify function to connect L2CAP channels in MCAP API
...
Profiles using MCAP should be able to free private data provided when
connecting both (data and control channels) even if connections process
is not success.
2010-10-06 10:37:07 +02:00
Elvis Pfützenreuter
cf25fc1f49
Added CSP enabling/disabling API; GError argument positioning
...
MCAP stack wakes up with CSP disabled. It must be enabled
explicitly. MCL connections created prior to CSP enabling
won't be CSP-capable; only new MCLs will.
GError pointer is by convention the last parameter in request functions.
2010-09-16 10:54:11 -03:00
Elvis Pfützenreuter
c1e45717d5
CSP-Master implementation
2010-09-16 10:54:11 -03:00
Elvis Pfützenreuter
3c01182f08
Added sync stop function for when MCL disconnects
2010-09-16 10:27:37 -03:00
Elvis Pfützenreuter
68a87ad124
Added member to MCL structure, CSP control struct initialization
2010-09-16 10:22:21 -03:00
Johan Hedberg
2c51f57c81
Use mcap_rsp instead of uint8_t where it makes sense
...
Get rid of unnecessary uint8_t * variables where mcap_rsp can be
directly used.
2010-09-16 15:33:54 +03:00
Johan Hedberg
c640b57f56
Get rid of unnecessary mdl variables
2010-09-16 15:19:53 +03:00
Johan Hedberg
9031c47dde
Get rid of unnecessary type casts with mcap_send_data
2010-09-16 15:19:18 +03:00
Johan Hedberg
028d168131
Make mcap_send_data accept void *
...
This makes it easier to pass the function data without having to do
explicit type casts.
2010-09-16 15:04:24 +03:00
Jose Antonio Santos Cadenas
e32375e831
Change the way that connections are rejected
...
MCAP requires that connections are refused at L2CAP layer using a
connection response "Connection refused -no resources available".
By default, deferred connections in BlueZ are rejected using the
code "Connection refused - security block".
As in BlueZ is not possible to reject the defer connection with
this response code. This patch don't defer the connection and
close it immediately. This is also a valid behaviour for rejecting
connections in MCAP.
2010-09-15 13:26:04 +02:00
Jose Antonio Santos Cadenas
5c90bde90b
Remove GError only when there is an error
2010-09-15 13:26:04 +02:00
Santiago Carot-Nemesio
d67dee724e
Supress glib warnings when a sources is removed with tag 0
2010-09-15 13:26:04 +02:00
Jose Antonio Santos Cadenas
b2ae2f7220
Avoid memory leak while connecting BTIO channels
2010-09-15 13:26:04 +02:00
Santiago Carot-Nemesio
b6d761f8ed
Use reference counter to manage MCL references in MCAP
2010-09-15 13:26:04 +02:00
Johan Hedberg
f47ef246ff
Fix potential NULL pointer access in MCAP code
2010-09-02 15:05:52 +03:00
Johan Hedberg
5c10242bc4
Simplify logic in close_mcl()
2010-09-02 15:04:56 +03:00
Johan Hedberg
4299e6f62d
Fix minor coding style issues in MCAP code
2010-09-02 15:02:00 +03:00
Santiago Carot-Nemesio
4ed1e1c608
Add initial support for synchronization protocol
2010-09-02 14:52:06 +03:00
Santiago Carot-Nemesio
e6a5eef667
Response with invalid operation when an invalid request is received
2010-09-02 14:52:06 +03:00
Jose Antonio Santos Cadenas
31c058313a
Add functions for getting mdl properties
2010-09-02 14:52:06 +03:00
Jose Antonio Santos Cadenas
0e64c1ad6b
Process MCAP process_md_delete_mdl request and response commands
2010-09-02 14:52:06 +03:00
Jose Antonio Santos Cadenas
ca55acd8e3
Process MCAP process_md_reconnect_mdl request and response commands
2010-09-02 14:52:05 +03:00
Jose Antonio Santos Cadenas
c93cc6ada5
Process MCAP process_md_abort_mdl request and response commands
2010-09-02 14:52:05 +03:00
Jose Antonio Santos Cadenas
27e19763cc
Implement connection of MCAP data links (MDL's)
2010-09-02 14:52:05 +03:00
Jose Antonio Santos Cadenas
7c7e5bea75
Process MCAP response mcap_md_create_mdl_rsp
2010-09-02 14:52:05 +03:00
Jose Antonio Santos Cadenas
ca054e1ffb
Process MCAP request mcap_md_create_mdl_req
2010-09-02 14:52:05 +03:00
Santiago Carot-Nemesio
8344e058d6
Send MCAP request mcap_md_create_mdl_req
2010-09-02 14:52:05 +03:00
Santiago Carot-Nemesio
797c342597
Prepare FSM functions for processing comands
2010-09-02 14:52:05 +03:00
Santiago Carot-Nemesio
b5577f29e9
Added function for MCAP control channel (MCL) management
2010-09-02 14:52:05 +03:00
Santiago Carot-Nemesio
aff7c2c8e3
Receive MCAP mcl connections from remote devices
2010-09-02 14:52:05 +03:00
Santiago Carot-Nemesio
49cbd0ac7b
Add MCAP instance management
2010-09-02 14:52:04 +03:00
Santiago Carot-Nemesio
f5d82ee872
Initial support for MCAP
2010-09-02 14:52:04 +03:00