Modified ocserver to make presence flow clearer.
authorMandeep Shetty <mandeep.shetty@intel.com>
Thu, 16 Apr 2015 00:18:01 +0000 (17:18 -0700)
committerVijay Kesavan <vijay.s.kesavan@intel.com>
Thu, 16 Apr 2015 22:13:43 +0000 (22:13 +0000)
C sample server ocserver.cpp had messages printed out on screen that
could be and were misinterpreted. Added messages to make what is going
on more obvious.

Change-Id: Ib21a83253527d763764f0294cbd82d45fafaebc3
Signed-off-by: Mandeep Shetty <mandeep.shetty@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/748
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Sakthivel Samidurai <sakthivel.samidurai@intel.com>
Reviewed-by: Vijay Kesavan <vijay.s.kesavan@intel.com>
resource/csdk/stack/samples/linux/SimpleClientServer/ocserver.cpp

index 88b6630..88668e9 100644 (file)
@@ -706,7 +706,7 @@ void *ChangeLightRepresentation (void *param)
 #ifdef WITH_PRESENCE
         if(stopPresenceCount > 0)
         {
-            OC_LOG_V(INFO, TAG, "================ presence count %d", stopPresenceCount);
+            OC_LOG_V(INFO, TAG, "================  Counting down to stop presence %d", stopPresenceCount);
         }
         if(!stopPresenceCount--)
         {
@@ -752,6 +752,8 @@ void *presenceNotificationGenerator(void *param)
                     getResult(res));
             break;
         }
+        OC_LOG_V(INFO, TAG, PCF("Created %s for presence notification"),
+                                presenceNotificationUris[i].c_str());
     }
     sleep(5);
     for(int i=0; i<numPresenceResources; i++)
@@ -766,6 +768,8 @@ void *presenceNotificationGenerator(void *param)
                     "resource %s.", presenceNotificationResources.at(i).c_str());
             break;
         }
+        OC_LOG_V(INFO, TAG, PCF("Deleted %s for presence notification"),
+                                presenceNotificationUris[i].c_str());
     }
     return NULL;
 }