[IOT-2764] Fix issue in GetObserverUsingId() 99/22599/5
authorSushil Yadav <sushil.ky@samsung.com>
Tue, 26 Sep 2017 05:40:35 +0000 (11:10 +0530)
committerAshok Babu Channa <ashok.channa@samsung.com>
Thu, 12 Oct 2017 05:30:33 +0000 (05:30 +0000)
commite989d24aa43b17787c969c4fa52863583916fa83
treef0da1c489dc74484660c241d2fa4a636b068c24f
parentb57f8a66c105767e5c859ac17de0865f6fa3bf4d
[IOT-2764] Fix issue in GetObserverUsingId()

The GetObserverUsingId() function should not assumes that observeId > 0.
For presenceResource the observeId = 0 when it is added as observer in
OCStartPresence() calls AddObserver() for presenceResource.

Bug: https://jira.iotivity.org/browse/IOT-2764
Change-Id: I6dceba0e2e8415c8e9d6b42339f30612b626cb0b
Signed-off-by: Sushil Yadav <sushil.ky@samsung.com>
resource/csdk/stack/src/ocobserve.c