<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    <br>
    thanks for investigating and providing the patch.<br>
    <br>
    Can you make a pull request on github? The patch is small but can be
    merged from small devices while traveling and also ensures that it
    compiles on TravisCI (without a need to compile locally).<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <br>
    <div class="moz-cite-prefix">On 06/07/15 11:43, Kelvin Chua wrote:<br>
    </div>
    <blockquote
cite="mid:CAMF97-cYuTGOYUXH8MfVLbJ9=9u+491YM0DpQgubcN3mQRZ9Nw@mail.gmail.com"
      type="cite">
      <div dir="ltr">when using mongodb with jansson, intermittent
        failures will be seen because jansson would change the order of
        keys inside a json object. mongodb would expect the first key to
        be a command, for example "insert". this is disastrous! below is
        a fix for jansson which will preserve the order on which the
        json object was created.
        <div><br>
        </div>
        <div>
          <div>--- modules/jansson/jansson_utils.c.old<span class=""
              style="white-space:pre"> </span>2015-07-06
            17:41:25.852770681 +0800</div>
          <div>+++ modules/jansson/jansson_utils.c<span class=""
              style="white-space:pre"> </span>2015-07-06
            17:42:27.384769579 +0800</div>
          <div>@@ -33,7 +33,7 @@</div>
          <div> <span class="" style="white-space:pre"> </span>val->flags
            = 0;</div>
          <div> </div>
          <div> <span class="" style="white-space:pre"> </span>if(json_is_object(v)
            || json_is_array(v)) {</div>
          <div>-<span class="" style="white-space:pre"> </span>const
            char* value = json_dumps(v, JSON_COMPACT);</div>
          <div>+<span class="" style="white-space:pre"> </span>const
            char* value = json_dumps(v,
            JSON_COMPACT|JSON_PRESERVE_ORDER);</div>
          <div> <span class="" style="white-space:pre"> </span>*freeme
            = (char*)value;</div>
          <div> <span class="" style="white-space:pre"> </span>val->rs.s
            = (char*)value;</div>
          <div> <span class="" style="white-space:pre"> </span>val->rs.len
            = strlen(value);</div>
        </div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div>
          <div><br clear="all">
            <div>
              <div class="gmail_signature">Kelvin Chua</div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a>
Book: SIP Routing With Kamailio - <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a></pre>
  </body>
</html>