Change observe option header behaviour to be in line with spec
authorZiran Sun <ziran.sun@samsung.com>
Tue, 21 Jun 2016 13:30:35 +0000 (14:30 +0100)
committerZiran Sun <ziran.sun@samsung.com>
Thu, 30 Jun 2016 09:37:56 +0000 (09:37 +0000)
commited9352f40b86c8d6c7e5f7732d4f68498ec69460
tree03e123fe20c798bf8f5db9d88a340d0a5a3d72ee
parent9b99c1aab222637e5f8e24c43458651bd1767411
Change observe option header behaviour to be in line with spec
at the following points:

1. If the resource can't register the client as observer,
or the resource does not support observe, then the resource
sends back normal GET Response with NO observe option field.

2. Upon successfully removing the client from observer list,
the resource sends back a normal GET response with NO observe
option field

3. This patch also reverted https://gerrit.iotivity.org/gerrit/#/c/8901/
after discussed with the author to be inline with spec.

JIRA issue: https://jira.iotivity.org/browse/IOT-1122

Change-Id: I36510baa69a8ef3be9e0d9aef3fbd40d31488b0f
Signed-off-by: Ziran Sun <ziran.sun@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/8815
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Mushfiqul Islam <i.mushfiq@samsung.com>
resource/csdk/stack/include/internal/ocstackinternal.h
resource/csdk/stack/src/ocresource.c
resource/csdk/stack/src/ocserverrequest.c
resource/csdk/stack/src/ocstack.c
resource/examples/simpleclient.cpp