Repository: incubator-mynewt-core Updated Branches: refs/heads/develop 7bedd6c51 -> f9bf3836c
fix echo command type and cleanup attribute array 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/f9bf3836 Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/f9bf3836 Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/f9bf3836 Branch: refs/heads/develop Commit: f9bf3836c9fedd62ab98d60192cbe61d426003a4 Parents: 7bedd6c Author: Paul Dietrich <paulfdietr...@yahoo.com> Authored: Fri Oct 14 12:17:02 2016 -0700 Committer: Paul Dietrich <paulfdietr...@yahoo.com> Committed: Fri Oct 14 12:17:46 2016 -0700 ---------------------------------------------------------------------- mgmt/newtmgr/nmgr_os/src/newtmgr_os.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/f9bf3836/mgmt/newtmgr/nmgr_os/src/newtmgr_os.c ---------------------------------------------------------------------- diff --git a/mgmt/newtmgr/nmgr_os/src/newtmgr_os.c b/mgmt/newtmgr/nmgr_os/src/newtmgr_os.c index 9fbc294..d0d70e8 100644 --- a/mgmt/newtmgr/nmgr_os/src/newtmgr_os.c +++ b/mgmt/newtmgr/nmgr_os/src/newtmgr_os.c @@ -111,17 +111,14 @@ nmgr_def_console_echo(struct mgmt_cbuf *cb) { long long int echo_on = 1; int rc; - struct cbor_attr_t attrs[3] = { + struct cbor_attr_t attrs[2] = { [0] = { .attribute = "echo", - .type = CborAttrTextStringType, + .type = CborAttrIntegerType, .addr.integer = &echo_on, .nodefault = 1 }, - [1] = { - .attribute = NULL - }, - [2] = { 0 }, + [1] = { 0 }, }; rc = cbor_read_object(&cb->it, attrs);