ENGINE-206 disable XER content in Sync message body in DEBUG mode. Seems to be triggering unicode transcoding problem in JNI adapter leading to NULL char in message. test_diphoton
authorEdouard Tisserant <edouard@pep-project.org>
Thu, 04 May 2017 16:57:23 +0200
branchtest_diphoton
changeset 17511312137788d5
parent 1749 32084f52dada
child 1780 07a6773bd842
ENGINE-206 disable XER content in Sync message body in DEBUG mode. Seems to be triggering unicode transcoding problem in JNI adapter leading to NULL char in message.
src/sync_impl.c
     1.1 --- a/src/sync_impl.c	Thu May 04 15:16:47 2017 +0200
     1.2 +++ b/src/sync_impl.c	Thu May 04 16:57:23 2017 +0200
     1.3 @@ -727,7 +727,7 @@
     1.4  }
     1.5  
     1.6  
     1.7 -#ifndef NDEBUG
     1.8 +#ifdef DEBUG_SYNC_XER_IN_MESSAGE_BODY
     1.9  static int _append(const void *buffer, size_t size, void *appkey)
    1.10  {
    1.11      char **dest_ptr = (char **)appkey;
    1.12 @@ -823,7 +823,7 @@
    1.13      free_identity(me);
    1.14      me = NULL;
    1.15  
    1.16 -#ifndef NDEBUG
    1.17 +#ifdef DEBUG_SYNC_XER_IN_MESSAGE_BODY
    1.18      asn_enc_rval_t er;
    1.19      er = xer_encode(&asn_DEF_DeviceGroup_Protocol, msg, 
    1.20                      XER_F_BASIC, _append, &_message->longmsg);