OCT 1. 更新获取所有用户协议
This commit is contained in:
parent
12553aacf3
commit
1749e049e6
|
@ -85,7 +85,7 @@ application:
|
||||||
# 2:采用AES128加密后的base64编码格式
|
# 2:采用AES128加密后的base64编码格式
|
||||||
# 3:采用3DES加密后的base64编码格式
|
# 3:采用3DES加密后的base64编码格式
|
||||||
# 4:采用AES256加密后的base64编码格式
|
# 4:采用AES256加密后的base64编码格式
|
||||||
crypto_type = 0;
|
crypto_type = 2;
|
||||||
crypto_key = "AES@rX2qZWVwGVlYTJLf/6X22w==";
|
crypto_key = "AES@rX2qZWVwGVlYTJLf/6X22w==";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -116,12 +116,10 @@ static void sendUserList(data19 *req, const char *pRequest) {
|
||||||
|
|
||||||
//fp += sprintf(fp, send200, strlen(rspBuf));
|
//fp += sprintf(fp, send200, strlen(rspBuf));
|
||||||
fp += sprintf(fp, "%s", pStrPro);
|
fp += sprintf(fp, "%s", pStrPro);
|
||||||
|
req->bytes = (int)(fp - req->dp);
|
||||||
|
|
||||||
cJSON_Delete(pRoot);
|
cJSON_Delete(pRoot);
|
||||||
//cJSON_Delete(pRspMsg);
|
|
||||||
free((void *)pStrPro);
|
free((void *)pStrPro);
|
||||||
|
|
||||||
req->bytes = (int)(fp - req->dp);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sendAllLists(data19 *req) {
|
static void sendAllLists(data19 *req) {
|
||||||
|
@ -141,11 +139,6 @@ static void sendAllLists(data19 *req) {
|
||||||
char *fp = req->dp;
|
char *fp = req->dp;
|
||||||
char *maxData = req->dp + (req->memSize - 512);
|
char *maxData = req->dp + (req->memSize - 512);
|
||||||
|
|
||||||
cJSON *pRspRoot = cJSON_CreateObject();
|
|
||||||
cJSON_AddNumberToObject(pRspRoot, "version", 3);
|
|
||||||
cJSON_AddNumberToObject(pRspRoot, "cryptoType", 0);
|
|
||||||
cJSON_AddNumberToObject(pRspRoot, "timeStamp", (unsigned int)time(nullptr));
|
|
||||||
|
|
||||||
cJSON *pRspMsg = cJSON_CreateObject();
|
cJSON *pRspMsg = cJSON_CreateObject();
|
||||||
cJSON *pMsgArray = cJSON_CreateArray();
|
cJSON *pMsgArray = cJSON_CreateArray();
|
||||||
|
|
||||||
|
@ -160,13 +153,14 @@ static void sendAllLists(data19 *req) {
|
||||||
//cJSON_AddItemToArray(pMsgArray, pRspItem);
|
//cJSON_AddItemToArray(pMsgArray, pRspItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
cJSON_AddItemToObject(pRspRoot, "msgContent", pRspMsg);
|
//cJSON_AddItemToObject(pRspRoot, "msgContent", pRspMsg);
|
||||||
|
|
||||||
fp += sprintf(fp, "%s", cJSON_Print(pRspRoot));
|
const char *pStrPro = proto_create_new(pRspMsg, 200);
|
||||||
|
|
||||||
cJSON_Delete(pRspRoot);
|
|
||||||
|
|
||||||
|
fp += sprintf(fp, "%s", pStrPro);
|
||||||
req->bytes = (int)(fp - req->dp);
|
req->bytes = (int)(fp - req->dp);
|
||||||
|
|
||||||
|
free((void *)pStrPro);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define VALUE_TO_DHCP_TLV(buf, val, tag) \
|
#define VALUE_TO_DHCP_TLV(buf, val, tag) \
|
||||||
|
|
Loading…
Reference in New Issue