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 cd8293558655fe5b127707bfaf9c868947d8ea95 Author: Christopher Collins <ccoll...@apache.org> AuthorDate: Thu Jan 4 15:19:10 2018 -0800 Make znp extra buffer larger (4B --> 8B). The znp type (struct zephyr_nmgr_pkt) is an intermediate construct used only during development. Therefore, this change will have no effect once znp is removed from the codebase. This change was necessary for BLE. We need to store the peer's address in the packet rather than just the connection pointer. Using just the pointer is not a good solution because it is impossible to perform all the necessary reference counting. --- smp/port/zephyr/include/zephyr_smp/zephyr_smp.h | 2 +- smp/port/zephyr/src/zephyr_smp.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/smp/port/zephyr/include/zephyr_smp/zephyr_smp.h b/smp/port/zephyr/include/zephyr_smp/zephyr_smp.h index c05ef01..c84ce91 100644 --- a/smp/port/zephyr/include/zephyr_smp/zephyr_smp.h +++ b/smp/port/zephyr/include/zephyr_smp/zephyr_smp.h @@ -19,7 +19,7 @@ typedef int zephyr_smp_transport_out_fn(struct zephyr_smp_transport *zst, * MTU query function. The supplied packet should contain a request received * from the peer whose MTU is being queried. This function takes a packet * parameter because some transports store connection-specific information in - * the packet (e.g., the BLE transport stores the connection pointer). + * the packet (e.g., the BLE transport stores the peer address). * * @return The transport's MTU; * 0 if transmission is currently not possible. diff --git a/smp/port/zephyr/src/zephyr_smp.c b/smp/port/zephyr/src/zephyr_smp.c index 759006d..823a67c 100644 --- a/smp/port/zephyr/src/zephyr_smp.c +++ b/smp/port/zephyr/src/zephyr_smp.c @@ -37,7 +37,7 @@ zephyr_smp_alloc_rsp(const void *req, void *arg) return NULL; } rsp_pkt->len = 0; - rsp_pkt->extra = req_pkt->extra; + memcpy(rsp_pkt->extra, req_pkt->extra, sizeof rsp_pkt->extra); return rsp_pkt; } -- To stop receiving notification emails like this one, please contact "commits@mynewt.apache.org" <commits@mynewt.apache.org>.