ccollins476ad closed pull request #1519: net/lora/node/src/lora_node.c: crash fix URL: https://github.com/apache/mynewt-core/pull/1519
This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/net/lora/node/src/lora_node.c b/net/lora/node/src/lora_node.c index 4e5bf3f848..d8a964b47a 100644 --- a/net/lora/node/src/lora_node.c +++ b/net/lora/node/src/lora_node.c @@ -58,6 +58,11 @@ uint8_t g_lora_app_key[LORA_KEY_LEN]; /* Flag to denote if we last sent a mac command */ uint8_t g_lora_node_last_tx_mac_cmd; +/* Used for LoRaMacInitialization(); */ +#if !MYNEWT_VAL(LORA_NODE_CLI) + LoRaMacCallback_t lora_cb; +#endif + /* MAC task */ #define LORA_MAC_STACK_SIZE (256) struct os_task g_lora_mac_task; @@ -626,7 +631,6 @@ lora_node_init(void) int rc; #if !MYNEWT_VAL(LORA_NODE_CLI) LoRaMacStatus_t lms; - LoRaMacCallback_t lora_cb; #endif rc = stats_init_and_reg( ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services