projects
/
platform
/
upstream
/
iotivity.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
61d276f
)
[IOT-2678] Adding Null check to fix crash
author
Sushil Yadav
<sushil.ky@samsung.com>
Thu, 14 Sep 2017 11:42:48 +0000
(17:12 +0530)
committer
Ashok Babu Channa
<ashok.channa@samsung.com>
Fri, 15 Sep 2017 12:58:21 +0000
(12:58 +0000)
Change-Id: I360d5ffbe468f16e40a1f1f3171edd1c0d23e94d
Signed-off-by: Sushil Yadav <sushil.ky@samsung.com>
resource/csdk/stack/src/ocstack.c
patch
|
blob
|
history
diff --git
a/resource/csdk/stack/src/ocstack.c
b/resource/csdk/stack/src/ocstack.c
index
a5e83fa
..
3c80031
100644
(file)
--- a/
resource/csdk/stack/src/ocstack.c
+++ b/
resource/csdk/stack/src/ocstack.c
@@
-3975,6
+3975,12
@@
OCStackResult OC_CALL OCStartPresence(const uint32_t ttl)
{
OIC_LOG(INFO, TAG, "Entering OCStartPresence");
uint8_t tokenLength = CA_MAX_TOKEN_LEN;
+ if (NULL == presenceResource.handle)
+ {
+ OIC_LOG(ERROR, TAG, "Invalid Presence Resource Handle: Not Initialized");
+ return OC_STACK_ERROR;
+ }
+
OCChangeResourceProperty(
&(((OCResource *)presenceResource.handle)->resourceProperties),
OC_ACTIVE, 1);