--- gwobex/obex-priv.c | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-) diff --git a/gwobex/obex-priv.c b/gwobex/obex-priv.c index c986744..5d3b458 100644 --- a/gwobex/obex-priv.c +++ b/gwobex/obex-priv.c @@ -898,11 +898,6 @@ gboolean gw_obex_get_with_aheaders(GwObex *ctx, OBEX_ObjectAddHeader(ctx->handle, object, OBEX_HDR_CONNECTION, hv, 4, 0); } - if (apparam && apparam_size > 0) { - hv.bs = (unsigned char *)apparam; - OBEX_ObjectAddHeader(ctx->handle, object, OBEX_HDR_APPARAM, hv, apparam_size, 0); - } - if (type) { hv.bs = (unsigned char *)type; OBEX_ObjectAddHeader(ctx->handle, object, OBEX_HDR_TYPE, hv, strlen(type) + 1, 0); @@ -939,6 +934,11 @@ gboolean gw_obex_get_with_aheaders(GwObex *ctx, } } + if (apparam && apparam_size > 0) { + hv.bs = (unsigned char *)apparam; + OBEX_ObjectAddHeader(ctx->handle, object, OBEX_HDR_APPARAM, hv, apparam_size, 0); + } + if (aheaders) { const GSList *hlist = aheaders; struct a_header *ah; @@ -1073,6 +1073,11 @@ gboolean gw_obex_put_with_aheaders(GwObex *ctx, OBEX_ObjectAddHeader(ctx->handle, object, OBEX_HDR_CONNECTION, hv, 4, 0); } + if (type) { + hv.bs = (unsigned char *)type; + OBEX_ObjectAddHeader(ctx->handle, object, OBEX_HDR_TYPE, hv, strlen(type) + 1, 0); + } + if (uname) { hv.bs = (unsigned char *)uname; OBEX_ObjectAddHeader(ctx->handle, object, OBEX_HDR_NAME, hv, uname_len, 0); @@ -1080,11 +1085,6 @@ gboolean gw_obex_put_with_aheaders(GwObex *ctx, uname = NULL; } - if (type) { - hv.bs = (unsigned char *)type; - OBEX_ObjectAddHeader(ctx->handle, object, OBEX_HDR_TYPE, hv, strlen(type) + 1, 0); - } - if (apparam && apparam_size > 0) { hv.bs = (unsigned char *)apparam; OBEX_ObjectAddHeader(ctx->handle, object, OBEX_HDR_APPARAM, hv, apparam_size, 0); -- 1.7.0.4 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html