Commit: ed3b98a683637882a2adebc0503b02e68e45c3d6
Parent: 7f803206541e93cbd07f57c78a76080de8e6d078
Author: Christian Fetzer <christian.fetzer@bmw-carit.de>
Committer: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: 2013-02-22 10:41:52
Tree: 61ff677b2272eea72756fbe9440f5b4a0da72b32

obexd: Handle absolute paths in obc_session_setpath For absolute paths (that begin with '/'), obc_session_setpath gets called twice to reset to the root folder. This is caused by an empty first element in the folder list created by g_strsplit. This solution sets the index to the folder array correctly and ignores empty folder names. This fixes as well paths with double slashes. Trace for 'SetFolder /telecom': < ACL data: handle 21 flags 0x00 dlen 21 L2CAP(d): cid 0x0040 len 17 [psm 3] RFCOMM(d): UIH: cr 1 dlci 32 pf 0 ilen 13 fcs 0xd8 OBEX: SetPath cmd(f): len 13 flags 2 constants 0 Connection ID (0xcb) = 17 Name (0x01) = Unicode length 0 > HCI Event: Number of Completed Packets (0x13) plen 5 handle 21 packets 1 > ACL data: handle 21 flags 0x02 dlen 11 L2CAP(d): cid 0x0041 len 7 [psm 3] RFCOMM(d): UIH: cr 0 dlci 32 pf 0 ilen 3 fcs 0x2 OBEX: SetPath rsp(f): status 200 len 3 < ACL data: handle 21 flags 0x00 dlen 21 L2CAP(d): cid 0x0040 len 17 [psm 3] RFCOMM(d): UIH: cr 1 dlci 32 pf 0 ilen 13 fcs 0xd8 OBEX: SetPath cmd(f): len 13 flags 2 constants 0 Connection ID (0xcb) = 17 Name (0x01) = Unicode length 0 > HCI Event: Number of Completed Packets (0x13) plen 5 handle 21 packets 1 > ACL data: handle 21 flags 0x02 dlen 11 L2CAP(d): cid 0x0041 len 7 [psm 3] RFCOMM(d): UIH: cr 0 dlci 32 pf 0 ilen 3 fcs 0x2 OBEX: SetPath rsp(f): status 200 len 3 < ACL data: handle 21 flags 0x00 dlen 37 L2CAP(d): cid 0x0040 len 33 [psm 3] RFCOMM(d): UIH: cr 1 dlci 32 pf 0 ilen 29 fcs 0xd8 OBEX: SetPath cmd(f): len 29 flags 2 constants 0 Connection ID (0xcb) = 17 Name (0x01) = Unicode length 16 0000: 00 74 00 65 00 6c 00 65 00 63 00 6f 00 6d 00 00 .t.e.l.e.c.o.m.. > HCI Event: Number of Completed Packets (0x13) plen 5 handle 21 packets 1 > ACL data: handle 21 flags 0x02 dlen 11 L2CAP(d): cid 0x0041 len 7 [psm 3] RFCOMM(d): UIH: cr 0 dlci 32 pf 0 ilen 3 fcs 0x2 OBEX: SetPath rsp(f): status 200 len 3

Diffstat

M obexd/client/session.c | 13 ++++++++- - - - -

1 files changed, 8 insertions(+), 5 deletions(-)

View Full Diff | Patch