Increase delay in ocserver.cpp sample to avoid missed notifications.
authorMandeep Shetty <mandeep.shetty@intel.com>
Thu, 24 Sep 2015 22:15:24 +0000 (15:15 -0700)
committerPatrick Lankswert <patrick.lankswert@intel.com>
Fri, 25 Sep 2015 15:53:56 +0000 (15:53 +0000)
This fixes IOT-726.
The sever started sending out presence notifications too quickly causing some
notifications to be missed.
Increased delay before notifications are sent out to make it convenient
for TE.

Change-Id: Ia6c92992f1000119a8f4dccde1de6bae4abeef5a
Signed-off-by: Mandeep Shetty <mandeep.shetty@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/3061
Reviewed-by: Mark Tung <mark.y.tung@intel.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Patrick Lankswert <patrick.lankswert@intel.com>
resource/csdk/stack/samples/tizen/SimpleClientServer/ocserver.cpp

index 944adc2..c5af603 100644 (file)
@@ -712,7 +712,7 @@ void *ChangeLightRepresentation (void *param)
 #ifdef WITH_PRESENCE
 void *presenceNotificationGenerator(void *param)
 {
-    sleep(10);
+    sleep(20);
     (void)param;
     OCDoHandle presenceNotificationHandles[numPresenceResources];
     OCStackResult res = OC_STACK_OK;
@@ -728,7 +728,7 @@ void *presenceNotificationGenerator(void *param)
     {
         if(res == OC_STACK_OK)
         {
-            sleep(1);
+            sleep(2);
             res = OCCreateResource(&presenceNotificationHandles[i],
                     presenceNotificationResources.at(i).c_str(),
                     OC_RSRVD_INTERFACE_DEFAULT,