//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
/* 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
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
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