From: Johan Hedberg <[email protected]> The following patch failed to update the call to os_mbuf_free_chain() after updating the signature of ble_hs_rx_data:
commit d1877420ca1f22352f616c478b42dfe2c21946bd Author: Christopher Collins <[email protected]> Date: Fri Jul 22 18:31:39 2016 -0700 Update sample NimBLE apps to use new mbuf API. Because the call to os_mbuf_free_chain() wasn't updated it causes the following compilation error: main.c: In function 'ble_hs_rx_data': main.c:138:24: error: passing argument 1 of 'os_mbuf_free_chain' from incompatible pointer type [-Werror=incompatible-pointer-types] os_mbuf_free_chain(om); ^~ In file included from repos/apache-mynewt-core/libs/os/include/os/os.h:97:0, from main.c:24: repos/apache-mynewt-core/libs/os/include/os/os_mbuf.h:278:5: note: expected 'struct os_mbuf *' but argument is of type 'struct os_mbuf **' int os_mbuf_free_chain(struct os_mbuf *om); --- apps/blehci/src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/blehci/src/main.c b/apps/blehci/src/main.c index 554572d..3ec6bdb 100755 --- a/apps/blehci/src/main.c +++ b/apps/blehci/src/main.c @@ -135,7 +135,7 @@ ble_hs_rx_data(struct os_mbuf **om) } /* Free the mbuf if we weren't able to enqueue it. */ - os_mbuf_free_chain(om); + os_mbuf_free_chain(*om); return rc; } -- 2.7.4
