Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api: refactor event callbacks #458

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixup! api: refactor event callbacks
  • Loading branch information
Danielius1922 committed Jun 5, 2023
commit bf60161e6a23b5ed1b0f44e985e7c167f99688c8
6 changes: 3 additions & 3 deletions api/oc_event_callback.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ oc_periodic_observe_callback_add(oc_resource_t *resource)
if (event_cb != NULL) {
OC_DBG(
"oc_event_callback: observe callback(%p) for resource(%s) already exists",
(void *)event_cb, oc_string(resource->name));
(void *)event_cb, oc_string(resource->uri));
return true;
}

Expand All @@ -258,7 +258,7 @@ oc_periodic_observe_callback_add(oc_resource_t *resource)
}

OC_DBG("oc_event_callback: observe callback(%p) for resource(%s) added",
(void *)event_cb, oc_string(resource->name));
(void *)event_cb, oc_string(resource->uri));
event_cb->data = resource;
event_cb->callback = periodic_observe_callback_handler;
OC_PROCESS_CONTEXT_BEGIN(&oc_timed_callback_events)
Expand All @@ -280,7 +280,7 @@ oc_periodic_observe_callback_remove(const oc_resource_t *resource)
oc_etimer_stop(&event_cb->timer);
oc_list_remove(g_observe_callbacks, event_cb);
OC_DBG("oc_event_callback: observe callback(%p) for resource(%s) removed",
(void *)event_cb, oc_string(resource->name));
(void *)event_cb, oc_string(resource->uri));
oc_memb_free(&g_event_callbacks_s, event_cb);
return true;
}
Expand Down
4 changes: 0 additions & 4 deletions api/oc_ri.c
Original file line number Diff line number Diff line change
Expand Up @@ -1504,10 +1504,6 @@ oc_ri_invoke_coap_entity_handler(const coap_packet_t *request,
return success;
}

#ifdef OC_CLIENT

#endif /* OC_CLIENT */

void
oc_ri_shutdown(void)
{
Expand Down
Loading