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 2017/11/27 09:14:28 UTC
[mynewt-core] branch master updated: apps/btshell: Fix compilation
with BLE_EXT_ADV disabled
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-core.git
The following commit(s) were added to refs/heads/master by this push:
new fb65da4 apps/btshell: Fix compilation with BLE_EXT_ADV disabled
fb65da4 is described below
commit fb65da4a12948ea9fd4424d0989db39c927752e7
Author: MichaĆ Narajowski <mi...@codecoup.pl>
AuthorDate: Fri Nov 24 12:07:11 2017 +0100
apps/btshell: Fix compilation with BLE_EXT_ADV disabled
Add missing #if directive to fix use of undeclared variable.
---
apps/btshell/src/cmd.c | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/apps/btshell/src/cmd.c b/apps/btshell/src/cmd.c
index de75225..f50a263 100644
--- a/apps/btshell/src/cmd.c
+++ b/apps/btshell/src/cmd.c
@@ -3618,17 +3618,19 @@ static const struct shell_cmd btshell_commands[] = {
void
cmd_init(void)
{
+#if MYNEWT_VAL(BLE_EXT_ADV)
int rc;
- shell_register(BTSHELL_MODULE, btshell_commands);
- shell_register_default_module(BTSHELL_MODULE);
-
- rc = os_mempool_init(&ext_adv_pool, 1,
- EXT_ADV_POOL_SIZE,
+ rc = os_mempool_init(&ext_adv_pool, 1, EXT_ADV_POOL_SIZE,
ext_adv_mem, "ext_adv_mem");
assert(rc == 0);
rc = os_mbuf_pool_init(&ext_adv_mbuf_pool, &ext_adv_pool,
- EXT_ADV_POOL_SIZE,
- 1);
+ EXT_ADV_POOL_SIZE, 1);
+
+ assert(rc == 0);
+#endif
+
+ shell_register(BTSHELL_MODULE, btshell_commands);
+ shell_register_default_module(BTSHELL_MODULE);
}
--
To stop receiving notification emails like this one, please contact
['"commits@mynewt.apache.org" <co...@mynewt.apache.org>'].