You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by cc...@apache.org on 2017/12/14 01:50:27 UTC

[mynewt-mcumgr] branch master updated (46c0a53 -> 78c504c)

This is an automated email from the ASF dual-hosted git repository.

ccollins pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-mcumgr.git.


    from 46c0a53  Initial implementation: mgmt, newtmgr
     new bce6547  newtmgr - Don't include hdr len in len field.
     new 78c504c  mynewt port - Keep bytes_written synced in writer.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 newtmgr/port/mynewt/src/mynewt_nmgr.c | 2 ++
 newtmgr/src/newtmgr.c                 | 5 +++--
 2 files changed, 5 insertions(+), 2 deletions(-)

-- 
To stop receiving notification emails like this one, please contact
['"commits@mynewt.apache.org" <co...@mynewt.apache.org>'].

[mynewt-mcumgr] 01/02: newtmgr - Don't include hdr len in len field.

Posted by cc...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ccollins pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-mcumgr.git

commit bce6547d713bd0dc2e5e133b9e313a11a8801cc6
Author: Christopher Collins <cc...@apache.org>
AuthorDate: Wed Dec 13 17:49:47 2017 -0800

    newtmgr - Don't include hdr len in len field.
---
 newtmgr/src/newtmgr.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/newtmgr/src/newtmgr.c b/newtmgr/src/newtmgr.c
index 5266cd7..0bf5bcc 100644
--- a/newtmgr/src/newtmgr.c
+++ b/newtmgr/src/newtmgr.c
@@ -161,7 +161,8 @@ nmgr_build_err_rsp(struct nmgr_streamer *streamer,
         return rc;
     }
 
-    rsp_hdr.nh_len = htons(cbor_encode_bytes_written(&cbuf.encoder));
+    rsp_hdr.nh_len = cbor_encode_bytes_written(&cbuf.encoder) - NMGR_HDR_SIZE;
+    nmgr_hton_hdr(&rsp_hdr);
     rc = nmgr_write_hdr(streamer, &rsp_hdr);
     if (rc != 0) {
         return rc;
@@ -250,7 +251,7 @@ nmgr_handle_single_req(struct nmgr_streamer *streamer,
         return rc;
     }
 
-    rsp_hdr.nh_len = cbor_encode_bytes_written(&cbuf.encoder);
+    rsp_hdr.nh_len = cbor_encode_bytes_written(&cbuf.encoder) - NMGR_HDR_SIZE;
     nmgr_hton_hdr(&rsp_hdr);
     rc = nmgr_write_hdr(streamer, &rsp_hdr);
     if (rc != 0) {

-- 
To stop receiving notification emails like this one, please contact
"commits@mynewt.apache.org" <co...@mynewt.apache.org>.

[mynewt-mcumgr] 02/02: mynewt port - Keep bytes_written synced in writer.

Posted by cc...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ccollins pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-mcumgr.git

commit 78c504c074e804d81136e9af1386a2f97853d5fe
Author: Christopher Collins <cc...@apache.org>
AuthorDate: Wed Dec 13 17:50:12 2017 -0800

    mynewt port - Keep bytes_written synced in writer.
---
 newtmgr/port/mynewt/src/mynewt_nmgr.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/newtmgr/port/mynewt/src/mynewt_nmgr.c b/newtmgr/port/mynewt/src/mynewt_nmgr.c
index 7e90e7b..0aa4c9b 100644
--- a/newtmgr/port/mynewt/src/mynewt_nmgr.c
+++ b/newtmgr/port/mynewt/src/mynewt_nmgr.c
@@ -107,6 +107,8 @@ mynewt_nmgr_write_at(struct cbor_encoder_writer *writer, int offset,
         return MGMT_ERR_EUNKNOWN;
     }
 
+    writer->bytes_written = OS_MBUF_PKTLEN(mw->m);
+
     return 0;
 }
 

-- 
To stop receiving notification emails like this one, please contact
"commits@mynewt.apache.org" <co...@mynewt.apache.org>.