obexd: Fix target size in Connect reply WHO header

Not all targets are 16 bytes (e.g. SyncML is 9).
This commit is contained in:
Johan Hedberg 2011-09-21 14:37:36 +09:00 committed by Marcel Holtmann
parent b58216bbe3
commit 6c56e60db1

View File

@ -504,7 +504,7 @@ static void cmd_connect(struct obex_session *os,
if (err == 0 && os->service->target) {
hd.bs = os->service->target;
OBEX_ObjectAddHeader(obex, obj,
OBEX_HDR_WHO, hd, 16,
OBEX_HDR_WHO, hd, os->service->target_size,
OBEX_FL_FIT_ONE_PACKET);
hd.bq4 = os->cid;
OBEX_ObjectAddHeader(obex, obj,