Merge tizen_5.0 codes into tizen_4.0
[platform/upstream/iotivity.git] / resource / csdk / security / provisioning / sample / subownerclient.c
index d13f1d2..cf14101 100644 (file)
@@ -179,7 +179,7 @@ static void LedCB(void *ctx, OCDoHandle UNUSED,
             printf("Received OC_STACK_OK from server\n");
             if(clientResponse->payload)
             {
-                printf("Response ===================> %s\n", clientResponse->payload);
+                printf("Response ===================> %p\n", clientResponse->payload);
             }
         }
         else if(OC_STACK_RESOURCE_CHANGED == clientResponse->result)
@@ -321,7 +321,7 @@ static int multipleOwnershipTransfer(void)
     // for error checking, the return value saved and printed
     g_doneCB = false;
 
-#ifdef _ENABLE_MULTIPLE_OWNER_
+#ifdef MULTIPLE_OWNER
     OCProvisionDev_t* dev = NULL;
     LL_FOREACH(g_motdev_list, dev)
     {
@@ -337,7 +337,7 @@ static int multipleOwnershipTransfer(void)
             }
         }
     }
-#endif //_ENABLE_MULTIPLE_OWNER_
+#endif //MULTIPLE_OWNER
 
     if(OC_STACK_OK != OCDoMultipleOwnershipTransfer(g_ctx, g_motdev_list, multipleOwnershipTransferCB))
     {
@@ -855,6 +855,11 @@ static int waitCallbackRet(void)
         }
     }
 
+    if(!g_doneCB)
+    {
+        OCPDMCleanupForTimeout();
+    }
+
     return 0;
 }