annotate OIC_LOG_BUFFER when looking for client callback and observer
[platform/upstream/iotivity.git] / resource / csdk / stack / src / occlientcb.c
index 054129f..40912b4 100644 (file)
@@ -224,13 +224,13 @@ ClientCB* GetClientCB(const CAToken_t token, uint8_t tokenLength,
     {
         OIC_LOG (INFO, TAG,  "Looking for token");
         OIC_LOG_BUFFER(INFO, TAG, (const uint8_t *)token, tokenLength);
-        OIC_LOG(INFO, TAG, "\tFound in callback list");
         LL_FOREACH(cbList, out)
         {
-            OIC_LOG_BUFFER(INFO, TAG, (const uint8_t *)out->token, tokenLength);
-
+            /* de-annotate below line if want to see all token in cbList */
+            //OIC_LOG_BUFFER(INFO, TAG, (const uint8_t *)out->token, tokenLength);
             if (memcmp(out->token, token, tokenLength) == 0)
             {
+                OIC_LOG(INFO, TAG, "Found in callback list");
                 return out;
             }
             CheckAndDeleteTimedOutCB(out);
@@ -238,10 +238,12 @@ ClientCB* GetClientCB(const CAToken_t token, uint8_t tokenLength,
     }
     else if (handle)
     {
+        OIC_LOG (INFO, TAG,  "Looking for handle");
         LL_FOREACH(cbList, out)
         {
             if (out->handle == handle)
             {
+                OIC_LOG(INFO, TAG, "Found in callback list");
                 return out;
             }
             CheckAndDeleteTimedOutCB(out);
@@ -252,9 +254,11 @@ ClientCB* GetClientCB(const CAToken_t token, uint8_t tokenLength,
         OIC_LOG_V(INFO, TAG, "Looking for uri %s", requestUri);
         LL_FOREACH(cbList, out)
         {
-            OIC_LOG_V(INFO, TAG, "\tFound %s", out->requestUri);
+            /* de-annotate below line if want to see all uri in cbList */
+            //OIC_LOG_V(INFO, TAG, "%s", out->requestUri);
             if (out->requestUri && strcmp(out->requestUri, requestUri ) == 0)
             {
+                OIC_LOG(INFO, TAG, "Found in callback list");
                 return out;
             }
             CheckAndDeleteTimedOutCB(out);