Modified additional field
[platform/upstream/iotivity.git] / service / easy-setup / enrollee / src / samsung / sc_easysetup.c
index 0f515fe..4875968 100644 (file)
@@ -317,40 +317,40 @@ void ReadUserdataCb(OCRepPayload* payload, char* resourceType, void** userdata)
                 SCWiFiConfProperties* pWifiConfProp = (SCWiFiConfProperties*)(*userdata);
                 for (size_t i = 0; i < dimensions[0]; i++)
                 {
-                   int64_t cd_channel = -1;
-                   char *cd_bssid = NULL;
-                   char *ssid = NULL;
-                   char *pwd = NULL;
-                   if (OCRepPayloadGetPropString(repPayload[i], SC_RSRVD_ES_VENDOR_SSID, &ssid))
+                   int64_t cdChannel = -1;
+                   char *cdBssid = NULL;
+                   char *cdSsid = NULL;
+                   char *cdPwd = NULL;
+                   if (OCRepPayloadGetPropString(repPayload[i], SC_RSRVD_ES_VENDOR_CANDIDATE_SSID, &cdSsid))
                    {
-                       OICStrcpy(pWifiConfProp->candidateAPInfo[i].ssid, sizeof(pWifiConfProp->candidateAPInfo[i].ssid), ssid);
-                       OICStrcpy(g_SCProperties.candidateAPInfo[i].ssid, sizeof(g_SCProperties.candidateAPInfo[i].ssid), ssid);
+                       OICStrcpy(pWifiConfProp->candidateAPInfo[i].ssid, sizeof(pWifiConfProp->candidateAPInfo[i].ssid), cdSsid);
+                       OICStrcpy(g_SCProperties.candidateAPInfo[i].ssid, sizeof(g_SCProperties.candidateAPInfo[i].ssid), cdSsid);
                        OIC_LOG_V(INFO_PRIVATE, SC_ENROLLEE_TAG, "[User specific property] %s : %s",
-                            SC_RSRVD_ES_VENDOR_SSID, ssid);
-                       OICFree(ssid);
+                            SC_RSRVD_ES_VENDOR_CANDIDATE_SSID, cdSsid);
+                       OICFree(cdSsid);
                    }
-                   if (OCRepPayloadGetPropString(repPayload[i], SC_RSRVD_ES_VENDOR_PASSPHRASE, &pwd))
+                   if (OCRepPayloadGetPropString(repPayload[i], SC_RSRVD_ES_VENDOR_CANDIDATE_PASSPHRASE, &cdPwd))
                    {
-                       OICStrcpy(pWifiConfProp->candidateAPInfo[i].passphrase, sizeof(pWifiConfProp->candidateAPInfo[i].passphrase), pwd);
-                       OICStrcpy(g_SCProperties.candidateAPInfo[i].passphrase, sizeof(g_SCProperties.candidateAPInfo[i].passphrase), pwd);
-                                              OIC_LOG_V(INFO_PRIVATE, SC_ENROLLEE_TAG, "[User specific property] %s : %s",
-                            SC_RSRVD_ES_VENDOR_PASSPHRASE, ssid);
-                       OICFree(pwd);
+                       OICStrcpy(pWifiConfProp->candidateAPInfo[i].passphrase, sizeof(pWifiConfProp->candidateAPInfo[i].passphrase), cdPwd);
+                       OICStrcpy(g_SCProperties.candidateAPInfo[i].passphrase, sizeof(g_SCProperties.candidateAPInfo[i].passphrase), cdPwd);
+                       OIC_LOG_V(INFO_PRIVATE, SC_ENROLLEE_TAG, "[User specific property] %s : %s",
+                            SC_RSRVD_ES_VENDOR_CANDIDATE_PASSPHRASE, cdPwd);
+                       OICFree(cdPwd);
                    }
-                   if (OCRepPayloadGetPropInt(repPayload[i], SC_RSRVD_ES_VENDOR_CANDIDATE_CHANNEL, &cd_channel))
+                   if (OCRepPayloadGetPropInt(repPayload[i], SC_RSRVD_ES_VENDOR_CANDIDATE_CHANNEL, &cdChannel))
                    {
-                       pWifiConfProp->candidateAPInfo[i].channel = (int) cd_channel;
-                       g_SCProperties.candidateAPInfo[i].channel = cd_channel;
-                                              OIC_LOG_V(INFO_PRIVATE, SC_ENROLLEE_TAG, "[User specific property] %s : %d",
-                            SC_RSRVD_ES_VENDOR_CANDIDATE_CHANNEL, (int) cd_channel);
+                       pWifiConfProp->candidateAPInfo[i].channel = (int) cdChannel;
+                       g_SCProperties.candidateAPInfo[i].channel = cdChannel;
+                       OIC_LOG_V(INFO_PRIVATE, SC_ENROLLEE_TAG, "[User specific property] %s : %d",
+                            SC_RSRVD_ES_VENDOR_CANDIDATE_CHANNEL, (int) cdChannel);
                    }
-                   if (OCRepPayloadGetPropString(repPayload[i], SC_RSRVD_ES_VENDOR_BSSID, &cd_bssid))
+                   if (OCRepPayloadGetPropString(repPayload[i], SC_RSRVD_ES_VENDOR_CANDIDATE_BSSID, &cdBssid))
                    {
-                       OICStrcpy(pWifiConfProp->candidateAPInfo[i].bssid, sizeof(pWifiConfProp->candidateAPInfo[i].bssid), cd_bssid);
-                       OICStrcpy(g_SCProperties.candidateAPInfo[i].bssid, sizeof(g_SCProperties.candidateAPInfo[i].bssid), cd_bssid);
-                                              OIC_LOG_V(INFO_PRIVATE, SC_ENROLLEE_TAG, "[User specific property] %s : %s",
-                            SC_RSRVD_ES_VENDOR_BSSID, cd_bssid);
-                       OICFree(bssid);
+                       OICStrcpy(pWifiConfProp->candidateAPInfo[i].bssid, sizeof(pWifiConfProp->candidateAPInfo[i].bssid), cdBssid);
+                       OICStrcpy(g_SCProperties.candidateAPInfo[i].bssid, sizeof(g_SCProperties.candidateAPInfo[i].bssid), cdBssid);
+                       OIC_LOG_V(INFO_PRIVATE, SC_ENROLLEE_TAG, "[User specific property] %s : %s",
+                            SC_RSRVD_ES_VENDOR_CANDIDATE_BSSID, cdBssid);
+                       OICFree(cdBssid);
                    }
                 }
                 pWifiConfProp->numCandidateAP = (int)dimensions[0];
@@ -683,9 +683,9 @@ void WriteUserdataCb(OCRepPayload* payload, char* resourceType)
                    OCRepPayloadDestroy(*repPayload);
                    break;
                }
-               OCRepPayloadSetPropString(repPayload[i], SC_RSRVD_ES_VENDOR_SSID, g_SCProperties.candidateAPInfo[i].ssid);
-               OCRepPayloadSetPropString(repPayload[i], SC_RSRVD_ES_VENDOR_PASSPHRASE, g_SCProperties.candidateAPInfo[i].passphrase);
-               OCRepPayloadSetPropString(repPayload[i], SC_RSRVD_ES_VENDOR_BSSID, g_SCProperties.candidateAPInfo[i].bssid);
+               OCRepPayloadSetPropString(repPayload[i], SC_RSRVD_ES_VENDOR_CANDIDATE_SSID, g_SCProperties.candidateAPInfo[i].ssid);
+               OCRepPayloadSetPropString(repPayload[i], SC_RSRVD_ES_VENDOR_CANDIDATE_PASSPHRASE, g_SCProperties.candidateAPInfo[i].passphrase);
+               OCRepPayloadSetPropString(repPayload[i], SC_RSRVD_ES_VENDOR_CANDIDATE_BSSID, g_SCProperties.candidateAPInfo[i].bssid);
                OCRepPayloadSetPropInt(repPayload[i], SC_RSRVD_ES_VENDOR_CANDIDATE_CHANNEL, g_SCProperties.candidateAPInfo[i].channel);
             }
             size_t dimensions[MAX_REP_ARRAY_DEPTH] = {g_SCProperties.numCandidateAP, 0, 0};