From 1d978e74cb00e6d43c7d0671bbf3a73f804a07c0 Mon Sep 17 00:00:00 2001 From: Terry Moore Date: Tue, 19 Mar 2019 13:13:36 -0400 Subject: [PATCH] Fix #268: these callbacks are now in client data --- src/lmic/lmic.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/lmic/lmic.c b/src/lmic/lmic.c index f7d32e07..ec08157f 100644 --- a/src/lmic/lmic.c +++ b/src/lmic/lmic.c @@ -1794,16 +1794,16 @@ static bit_t processDnData (void) { #if LMIC_ENABLE_DeviceTimeReq lmic_request_time_state_t const requestTimeState = LMIC.txDeviceTimeReqState; if ( requestTimeState != lmic_RequestTimeState_idle ) { - lmic_request_network_time_cb_t * const pNetworkTimeCb = LMIC.pNetworkTimeCb; + lmic_request_network_time_cb_t * const pNetworkTimeCb = LMIC.client.pNetworkTimeCb; int flagSuccess = (LMIC.txDeviceTimeReqState == lmic_RequestTimeState_success); LMIC.txDeviceTimeReqState = lmic_RequestTimeState_idle; if (pNetworkTimeCb != NULL) { // reset the callback, so that the user's routine // can post another request if desired. - LMIC.pNetworkTimeCb = NULL; + LMIC.client.pNetworkTimeCb = NULL; // call the user's notification routine. - (*pNetworkTimeCb)(LMIC.pNetworkTimeUserData, flagSuccess); + (*pNetworkTimeCb)(LMIC.client.pNetworkTimeUserData, flagSuccess); } } #endif // LMIC_ENABLE_DeviceTimeReq @@ -2337,8 +2337,8 @@ void LMIC_requestNetworkTime(lmic_request_network_time_cb_t *pCallbackfn, void * #if LMIC_ENABLE_DeviceTimeReq if (LMIC.txDeviceTimeReqState == lmic_RequestTimeState_idle) { LMIC.txDeviceTimeReqState = lmic_RequestTimeState_tx; - LMIC.pNetworkTimeCb = pCallbackfn; - LMIC.pNetworkTimeUserData = pUserData; + LMIC.client.pNetworkTimeCb = pCallbackfn; + LMIC.client.pNetworkTimeUserData = pUserData; return; } #endif // LMIC_ENABLE_DeviceTimeReq