You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ut...@apache.org on 2020/03/12 14:02:19 UTC
[mynewt-mcumgr] branch master updated: ext: lib: mgmt: Enabling
Zephyr/mynewt-core version of tinycbor
This is an automated email from the ASF dual-hosted git repository.
utzig pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-mcumgr.git
The following commit(s) were added to refs/heads/master by this push:
new 98e8f32 ext: lib: mgmt: Enabling Zephyr/mynewt-core version of tinycbor
98e8f32 is described below
commit 98e8f320b487a775f49bf554ea29fe8958ab506f
Author: Dominik Ermel <do...@nordicsemi.no>
AuthorDate: Fri Jan 10 10:32:57 2020 +0000
ext: lib: mgmt: Enabling Zephyr/mynewt-core version of tinycbor
Changes needed due to overwrite of Zephyr fork of Tinycbor with
mynewt-core version.
Signed-off-by: Dominik Ermel <do...@nordicsemi.no>
---
cborattr/src/cborattr.c | 4 ----
mgmt/src/mgmt.c | 9 ---------
2 files changed, 13 deletions(-)
diff --git a/cborattr/src/cborattr.c b/cborattr/src/cborattr.c
index 395c2ec..31131b7 100644
--- a/cborattr/src/cborattr.c
+++ b/cborattr/src/cborattr.c
@@ -400,11 +400,7 @@ cbor_read_flat_attrs(const uint8_t *data, int len,
CborError err;
cbor_buf_reader_init(&reader, data, len);
-#ifdef __ZEPHYR__
- err = cbor_parser_cust_reader_init(&reader.r, 0, &parser, &value);
-#else
err = cbor_parser_init(&reader.r, 0, &parser, &value);
-#endif
if (err != CborNoError) {
return -1;
}
diff --git a/mgmt/src/mgmt.c b/mgmt/src/mgmt.c
index ba366a7..08343bb 100644
--- a/mgmt/src/mgmt.c
+++ b/mgmt/src/mgmt.c
@@ -157,21 +157,12 @@ mgmt_ctxt_init(struct mgmt_ctxt *ctxt, struct mgmt_streamer *streamer)
{
int rc;
-#ifdef __ZEPHYR__
- rc = cbor_parser_cust_reader_init(streamer->reader, 0, &ctxt->parser,
- &ctxt->it);
-#else
rc = cbor_parser_init(streamer->reader, 0, &ctxt->parser, &ctxt->it);
-#endif
if (rc != CborNoError) {
return mgmt_err_from_cbor(rc);
}
-#ifdef __ZEPHYR__
- cbor_encoder_cust_writer_init(&ctxt->encoder, streamer->writer, 0);
-#else
cbor_encoder_init(&ctxt->encoder, streamer->writer, 0);
-#endif
return 0;
}