All pastes #750881 Raw Edit

Something

public text v1 · immutable
#750881 ·published 2007-10-26 21:17 UTC
rendered paste body
Index: libsyncml/transports/obex_client.c
===================================================================
--- libsyncml/transports/obex_client.c  (revision 254)
+++ libsyncml/transports/obex_client.c  (working copy)
@@ -636,7 +636,7 @@
        /* Make a new get command */
        obj = OBEX_ObjectNew(env->obexhandle, OBEX_CMD_GET);
        if (!obj) {
-               smlErrorSet(&error, SML_ERROR_GENERIC, "Unable to create new put object");
+               smlErrorSet(&error, SML_ERROR_GENERIC, "Unable to create new get object");
                goto error;
        }
 
@@ -650,6 +650,13 @@
        /* Now add the target mime type */
        //header.bs = (unsigned char *)unicode;
        //OBEX_ObjectAddHeader(env->obexhandle, obj, OBEX_HDR_TYPE, header, unicodesize, 0);
+
+       /* HACK HACK HACK HACK HACK */
+       if (data->type == SML_MIMETYPE_SAN) {
+               target = SML_ELEMENT_WBXML; // This is a hardcorded ugly workaround!
+               env->mimetype = SML_MIMETYPE_WBXML;
+       }
+
        header.bs = (unsigned char *)target;
        OBEX_ObjectAddHeader(env->obexhandle, obj, OBEX_HDR_TYPE, header, strlen(target) + 1, 0);