Commit 43956c94 authored by Kishen Maloor's avatar Kishen Maloor

Merge branch 'master' into 'master'

oc_pstat: fix logic for removing observers

See merge request !2
parents 67df64e4 2165e2a6
Pipeline #84 passed with stage
in 46 seconds
......@@ -258,9 +258,6 @@ oc_pstat_handle_state(oc_sec_pstat_t *ps, size_t device, bool from_storage,
ps->p = false;
} break;
case OC_DOS_RFNOP: {
#ifdef OC_SERVER
coap_remove_observers_on_dos_change(device, false);
#endif /* OC_SERVER */
ps->p = true;
ps->cm = 0;
ps->tm = 0;
......@@ -313,6 +310,9 @@ oc_pstat_handle_state(oc_sec_pstat_t *ps, size_t device, bool from_storage,
goto pstat_state_error;
}
ps->p = false;
#ifdef OC_SERVER
coap_remove_observers_on_dos_change(device, false);
#endif /* OC_SERVER */
} break;
case OC_DOS_SRESET: {
ps->p = true;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment