resource.c: Implement the coap_resource_notify_observers() function

Reuse coap_resource_set_dirty() and make coap_resource_set_dirty()
call coap_resource_notify_observers().
This commit is contained in:
Jon Shallow committed 2018-04-04 18:39:12 +01:00
1 parent 5ecc164caa
commit ac97aeb9bc
1 file changed
+5
+5
View File
@@ -757,6 +757,11 @@ coap_notify_observers(coap_context_t *context, coap_resource_t *r) {
int
coap_resource_set_dirty(coap_resource_t *r, const str *query) {
return coap_resource_notify_observers(r, query);
}
int
coap_resource_notify_observers(coap_resource_t *r, const str *query) {
if (!r->observable)
return 0;
if (query) {