Disconnect rfcomm connections 13/97713/1
authorSeungyoun Ju <sy39.ju@samsung.com>
Thu, 13 Oct 2016 11:59:02 +0000 (20:59 +0900)
committerSudha Bheemanna <b.sudha@samsung.com>
Tue, 15 Nov 2016 04:17:48 +0000 (09:47 +0530)
commitde0b442e3ad6afc2fb8a80fa11c165d477b87b9f
tree6d8a913e93ee7e58b438d0d04a204570337fa031
parentc04baedcd61df90c7ed1441854fdeec281e5e8e0
Disconnect rfcomm connections

[Model] COMMON
[BinType] AP
[Customer] OPEN

[Issue#] P161013-00685
[Request] PLM
[Occurrence Version] R735AUCU2CPJ3

Since MDM is not used in Tizen 3.0, only the disconnect all connections
function is retained in this patch while merging from SLP.

[Problem] sapd is not working when SPP MDM policy is changed
 from "disallow" to "allow"
[Cause & Measure] sapd doesn't consider this scenario and it just blocks
 the communication once socket API's return error code. But our policy is also
 not consistent (Only Tx is disallowed when SPP policy is restricted.
 But the connection is alive and Rx is possible).
 So it is better to disconnect the SPP when it is restricted.
 And in this case, BT_ERROR_OPERATION_FAILED is returned to service daemon
 so it is hard to decide whether this failure is caused by MDM or not.
 So disconnection is implemented in bt-api when SPP MDM policy is restricted.
[Checking Method] Make SPP connection -> Change SPP policy to restricted

[Team] Basic connection
[Developer] Seungyoun Ju
[Solution company] Samsung
[Change Type] Specification change

Change-Id: Iaaa18b7f786477123ae485dc4564c0189e730642
Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
Change-Id: Iaaa18b7f786477123ae485dc4564c0189e730642
bt-api/bt-rfcomm-client.c
bt-api/bt-rfcomm-server.c
bt-api/include/bt-common.h