|
@@ -54,11 +54,11 @@ uint8_t analysisRegistData(uint8_t * regist_data, uint16_t regist_data_length, s
|
|
|
Log_Printf_Debug("json parse error,%s\r\n",cJSON_GetErrorPtr());
|
|
Log_Printf_Debug("json parse error,%s\r\n",cJSON_GetErrorPtr());
|
|
|
result = 0;
|
|
result = 0;
|
|
|
}
|
|
}
|
|
|
- else if(cJSON_GetObjectItem(json,"deviceSecret")->valueint == 200)
|
|
|
|
|
|
|
+ else if(cJSON_GetObjectItem(json, "code")->valueint == 200)
|
|
|
{
|
|
{
|
|
|
- strcpy(regist_data_struct->deviceSecret, cJSON_GetObjectItem(json,"deviceSecret")->valuestring);
|
|
|
|
|
- strcpy(regist_data_struct->productKey, cJSON_GetObjectItem(json,"productKey")->valuestring);
|
|
|
|
|
- strcpy(regist_data_struct->deviceName, cJSON_GetObjectItem(json,"deviceName")->valuestring);
|
|
|
|
|
|
|
+ strcpy(regist_data_struct->deviceSecret, cJSON_GetObjectItem(json, "deviceSecret")->valuestring);
|
|
|
|
|
+ strcpy(regist_data_struct->productKey, cJSON_GetObjectItem(json, "productKey")->valuestring);
|
|
|
|
|
+ strcpy(regist_data_struct->deviceName, cJSON_GetObjectItem(json, "deviceName")->valuestring);
|
|
|
result = 1;
|
|
result = 1;
|
|
|
}
|
|
}
|
|
|
else
|
|
else
|