diff options
Diffstat (limited to 'Middlewares/ST/STM32_WPAN/thread/openthread/core/openthread_api/coap.c')
-rw-r--r-- | Middlewares/ST/STM32_WPAN/thread/openthread/core/openthread_api/coap.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Middlewares/ST/STM32_WPAN/thread/openthread/core/openthread_api/coap.c b/Middlewares/ST/STM32_WPAN/thread/openthread/core/openthread_api/coap.c index e5940dda7..ee1e8ceb8 100644 --- a/Middlewares/ST/STM32_WPAN/thread/openthread/core/openthread_api/coap.c +++ b/Middlewares/ST/STM32_WPAN/thread/openthread/core/openthread_api/coap.c @@ -31,6 +31,7 @@ #include "thread.h" #include "coap.h" +extern otCoapRequestHandler defaultCoapRequestHandlerCb; #if OPENTHREAD_ENABLE_APPLICATION_COAP @@ -478,6 +479,8 @@ void otCoapSetDefaultHandler(otInstance *aInstance, otCoapRequestHandler aHandle /* prepare buffer */ Thread_OT_Cmd_Request_t* p_ot_req = THREAD_Get_OTCmdPayloadBuffer(); + defaultCoapRequestHandlerCb = aHandler; + p_ot_req->ID = MSG_M4TOM0_OT_COAP_SET_DEFAULT_HANDLER; p_ot_req->Size=2; |