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/03/03 17:36:20 UTC

[05/26] incubator-mynewt-core git commit: nimble/l2cap: Memset response in L2CAP LE CoC connect request

nimble/l2cap: Memset response in L2CAP LE CoC connect request

This is in order to not send trash in case of error response.


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/ced3e8b2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/ced3e8b2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/ced3e8b2

Branch: refs/heads/develop
Commit: ced3e8b2469a914562abbbb3c8711629fd69f846
Parents: 509cd5f
Author: \u0141ukasz Rymanowski <lu...@codecoup.pl>
Authored: Wed Feb 22 17:15:35 2017 +0100
Committer: \u0141ukasz Rymanowski <lu...@codecoup.pl>
Committed: Fri Mar 3 12:40:41 2017 +0100

----------------------------------------------------------------------
 net/nimble/host/src/ble_l2cap_sig.c | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/ced3e8b2/net/nimble/host/src/ble_l2cap_sig.c
----------------------------------------------------------------------
diff --git a/net/nimble/host/src/ble_l2cap_sig.c b/net/nimble/host/src/ble_l2cap_sig.c
index 94bb271..a1a3399 100644
--- a/net/nimble/host/src/ble_l2cap_sig.c
+++ b/net/nimble/host/src/ble_l2cap_sig.c
@@ -631,6 +631,8 @@ ble_l2cap_sig_coc_req_rx(uint16_t conn_handle, struct ble_l2cap_sig_hdr *hdr,
         return 0;
     }
 
+    memset(rsp, 0, sizeof(*rsp));
+
     req = (struct ble_l2cap_sig_le_con_req *)(*om)->om_data;
 
     ble_hs_lock();