OSDN Git Service

gobex: automatically use SRM when transport type is SOCK_SEQPACKET
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Tue, 3 Jan 2012 13:52:23 +0000 (15:52 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Tue, 4 Dec 2012 21:22:05 +0000 (22:22 +0100)
commite85cc70c4f81683f5bfcdbfe063eb0ee1aa4f437
treebaf8d7e090b531a006a47c797871b10f4c432831
parentf062c46212162b7e6fcdacd3db0ec0a8312fc889
gobex: automatically use SRM when transport type is SOCK_SEQPACKET

This simplifies the applications so SRM setup phase became transparent
while using SOCK_SEQPACKET which is useful for GOEP 2.0 since in that
case we can only use SRM if the transport is L2CAP.

This also follows GOEP 2.0 Page 14 - 4.6 Using Single Response Mode:

  "The Server cannot issue an enable request, but can only issue a
  response to an enable request from the Client. SRM will remain in
  effect for the duration of the operation that enabled it (PUT or GET)
  ...
  SRM headers shall not be sent in CONNECT request or response packets."

and Page 22 - 5.4 Establishment of OBEX Connection:

  "SRM headers shall not be sent in the Connect request or response
  packets (note, this is to preserve backwards compatibility). SRM shall
  be enabled through Put and Get operations only."

So only in case of PUT or GET requests SRM is automatically configured,
applications can still enable it manually for other operations by adding
the headers like before but it is not recommended.

Note that it would be a good practice to indicate SRM support by using
value 0x02, but since that should happens during CONNECT command it is
not done automatically for requests when acting as a client, server
responding to indicate requests will automatically add SRM headers though.
gobex/gobex.c