mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-08 18:32:53 +03:00
resource.c: Use initialized token in coap_notify_observers()
This commit is contained in:
1 parent
da6459416f
commit
6cd2ecb136
1 file changed
+1
-2
+1
-2
@@ -867,7 +867,6 @@ coap_notify_observers(coap_context_t *context, coap_resource_t *r,
|
||||
coap_deleting_resource_t deleting) {
|
||||
coap_method_handler_t h;
|
||||
coap_subscription_t *obs, *otmp;
|
||||
coap_bin_const_t token;
|
||||
coap_pdu_t *response;
|
||||
uint8_t buf[4];
|
||||
coap_string_t *query;
|
||||
@@ -979,7 +978,7 @@ coap_notify_observers(coap_context_t *context, coap_resource_t *r,
|
||||
coap_remove_option(response, COAP_OPTION_OBSERVE);
|
||||
}
|
||||
if (COAP_RESPONSE_CLASS(response->code) > 2) {
|
||||
coap_delete_observer(r, obs->session, &token);
|
||||
coap_delete_observer(r, obs->session, &obs->pdu->actual_token);
|
||||
obs = NULL;
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in new issue
Block a user