replace : iotivity -> iotivity-sec
[platform/upstream/iotivity.git] / resource / csdk / stack / samples / linux / secure / occlientdirectpairing.cpp
index 5ae096b..74dd822 100644 (file)
@@ -61,8 +61,8 @@ static char DISCOVERY_QUERY[] = "%s/oic/res";
 //Secure Virtual Resource database for Iotivity Client application\r
 //It contains Client's Identity and the PSK credentials\r
 //of other devices which the client trusts\r
-static char CRED_FILE[] = "oic_svr_db_client_directpairing.dat";
-
+static char CRED_FILE[] = "oic_svr_db_client_directpairing.dat";\r
+\r
 static const OCDPDev_t *discoveredDevs = NULL;\r
 static const OCDPDev_t *pairedDevs = NULL;\r
 \r
@@ -335,8 +335,8 @@ int DeviceDiscovery()
     /* Start a discovery query*/\r
     OIC_LOG_V(INFO, TAG, "Resource Discovery : %s\n", queryUri);\r
 \r
-    ret = OCDoResource(NULL, OC_REST_DISCOVER, queryUri, 0, 0, CT_DEFAULT,\r
-                       OC_LOW_QOS, &cbData, NULL, 0);\r
+    ret = OCDoRequest(NULL, OC_REST_DISCOVER, queryUri, 0, 0, CT_DEFAULT,\r
+                      OC_LOW_QOS, &cbData, NULL, 0);\r
     if (ret != OC_STACK_OK)\r
     {\r
         OIC_LOG(ERROR, TAG, "OCStack resource error");\r
@@ -400,8 +400,8 @@ OCStackResult SendGetRequest(OCDPDev_t* peer)
     cbData.cd = NULL;\r
 \r
     OIC_LOG(INFO, TAG, "Request to /a/light ");\r
-    ret = OCDoResource(&handle, OC_REST_GET, szQueryUri,\r
-               &endpoint, NULL, peer->connType, OC_LOW_QOS, &cbData, NULL, 0);\r
+    ret = OCDoRequest(&handle, OC_REST_GET, szQueryUri,\r
+                      &endpoint, NULL, peer->connType, OC_LOW_QOS, &cbData, NULL, 0);\r
     if (ret != OC_STACK_OK)\r
     {\r
         OIC_LOG_V(ERROR, TAG, "OCDoResource returns error %d with method %d", ret, OC_REST_GET);\r
@@ -527,8 +527,8 @@ void *CLInterface(void *data)
                     OIC_LOG(ERROR, TAG, "Invalid PIN");\r
                     continue;\r
                 }\r
-                sscanf(input, "%8s", pinNumber);
-                printf("\n");
+                sscanf(input, "%8s", pinNumber);\r
+                printf("\n");\r
 \r
                 ret = DoDirectPairing(peer, pmSel, pinNumber);\r
                 if (OC_STACK_OK != ret)\r