From b44d125d80f3ae09da939e96e4f36e320ff28a03 Mon Sep 17 00:00:00 2001 From: Matthias Kovatsch Date: Mon, 30 Jan 2012 22:01:31 +0100 Subject: [PATCH] Observe handler now checks if GET request. --- apps/er-coap-07/er-coap-07-observing.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/er-coap-07/er-coap-07-observing.c b/apps/er-coap-07/er-coap-07-observing.c index f3dc7425d..4da0f5f67 100644 --- a/apps/er-coap-07/er-coap-07-observing.c +++ b/apps/er-coap-07/er-coap-07-observing.c @@ -191,7 +191,7 @@ coap_observe_handler(resource_t *resource, void *request, void *response) static char content[26]; - if (coap_res && coap_res->code<128) /* response without error code */ + if (coap_req->code==COAP_GET && coap_res && coap_res->code<128) /* GET request and response without error code */ { if (IS_OPTION(coap_req, COAP_OPTION_OBSERVE)) {