Fix client crash caused by observe cancellation with sequence No 1.
authorZiran Sun <ziran.sun@samsung.com>
Wed, 20 Jul 2016 15:16:52 +0000 (16:16 +0100)
committerZiran Sun <ziran.sun@samsung.com>
Tue, 26 Jul 2016 08:42:33 +0000 (08:42 +0000)
commite1dc057b59408d7188487eceb6956a5d30a78458
tree1048f997cc8b3ff91e8aa336f928fe06cb2a978d
parentce6c2531d2044bdbb5ffc884a2182de7a52794cc
Fix client crash caused by observe cancellation with sequence No 1.

1. Added support for sequence number starting from 1.
2. When sequence number is 1, client treats it as a normal response
rather than de-registration response.
3. Correct default sequence number value to be valid.

JIRA Issue: https://jira.iotivity.org/browse/IOT-1195

Change-Id: I2ce68d70ff5f8f0cce98234a7dbda566b8085a61
Signed-off-by: Ziran Sun <ziran.sun@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/9519
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Mushfiqul Islam <i.mushfiq@samsung.com>
Reviewed-by: Phil Coval <philippe.coval@osg.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
resource/src/InProcClientWrapper.cpp