You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ma...@apache.org on 2016/05/19 22:00:17 UTC

[03/12] incubator-mynewt-core git commit: Fix json encoding

Fix json encoding

- Changing atoi to strtoull and strtoll as atoi return only 32 bit
  values. strtoll and strtoull return 64bit values which we encode our
inetegers as.
- Changing a few other places where json encoding should use 64 bit
  values instead of 32 bit.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/474032e3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/474032e3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/474032e3

Branch: refs/heads/develop
Commit: 474032e30d60e07d9176981452c61507b0c09a47
Parents: d5ffce1
Author: Vipul Rahane <vi...@runtime.io>
Authored: Mon Apr 25 17:33:21 2016 -0700
Committer: Vipul Rahane <vi...@runtime.io>
Committed: Tue May 17 12:27:24 2016 -0700

----------------------------------------------------------------------
 libs/newtmgr/src/newtmgr.c | 2 +-
 sys/log/src/log_nmgr.c     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/474032e3/libs/newtmgr/src/newtmgr.c
----------------------------------------------------------------------
diff --git a/libs/newtmgr/src/newtmgr.c b/libs/newtmgr/src/newtmgr.c
index 9085893..f908bde 100644
--- a/libs/newtmgr/src/newtmgr.c
+++ b/libs/newtmgr/src/newtmgr.c
@@ -323,7 +323,7 @@ nmgr_jbuf_write(void *arg, char *data, int len)
 
     rc = nmgr_rsp_extend(njb->njb_hdr, njb->njb_out_m, data, len);
     if (rc != 0) {
-        //assert(0);
+        /*VVV: assert(0);*/
         goto err;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/474032e3/sys/log/src/log_nmgr.c
----------------------------------------------------------------------
diff --git a/sys/log/src/log_nmgr.c b/sys/log/src/log_nmgr.c
index dc71198..732d264 100644
--- a/sys/log/src/log_nmgr.c
+++ b/sys/log/src/log_nmgr.c
@@ -58,7 +58,7 @@ static struct nmgr_handler log_nmgr_group_handlers[] = {
 struct encode_off {
     struct json_encoder *eo_encoder;
     int64_t eo_ts;
-    uint32_t eo_index;
+    uint8_t eo_index;
 };
 
 static int