Merge remote-tracking branch 'origin/v1.0.1_dev' into v1.0.1_dev
This commit is contained in:
commit
18ff9d155b
|
@ -594,7 +594,6 @@ static int delete_dhcpd_rangeset(data19 *req, const char *pRequest) {
|
||||||
|
|
||||||
HASH_DEL(delMap, delRange);
|
HASH_DEL(delMap, delRange);
|
||||||
} else {
|
} else {
|
||||||
//Write dhcpRanges
|
|
||||||
memcpy(&dhcpRanges[resCount], &cfig.dhcpRanges[i], sizeof(struct data13));
|
memcpy(&dhcpRanges[resCount], &cfig.dhcpRanges[i], sizeof(struct data13));
|
||||||
resCount++;
|
resCount++;
|
||||||
}
|
}
|
||||||
|
@ -602,8 +601,7 @@ static int delete_dhcpd_rangeset(data19 *req, const char *pRequest) {
|
||||||
|
|
||||||
//The input parameter does not exist
|
//The input parameter does not exist
|
||||||
if (resCount > cfig.rangeCount - cJSON_GetArraySize(pdhcp_range)) {
|
if (resCount > cfig.rangeCount - cJSON_GetArraySize(pdhcp_range)) {
|
||||||
cJSON *pdel_Item = cJSON_CreateObject();
|
auto *s = (PHASH_MAP)malloc(sizeof(HASH_MAP));
|
||||||
auto *s = (PHASH_MAP)malloc(sizeof(HASH_MAP));
|
|
||||||
PHASH_MAP tmp;
|
PHASH_MAP tmp;
|
||||||
char saddr[128];
|
char saddr[128];
|
||||||
char eaddr[128];
|
char eaddr[128];
|
||||||
|
@ -611,6 +609,7 @@ static int delete_dhcpd_rangeset(data19 *req, const char *pRequest) {
|
||||||
memset(del_range, 0, 256);
|
memset(del_range, 0, 256);
|
||||||
|
|
||||||
HASH_ITER(hh, delMap, s, tmp) {
|
HASH_ITER(hh, delMap, s, tmp) {
|
||||||
|
cJSON *pdel_Item = cJSON_CreateObject();
|
||||||
IP2String(saddr, ntohl(s->key));
|
IP2String(saddr, ntohl(s->key));
|
||||||
IP2String(eaddr, ntohl(s->value));
|
IP2String(eaddr, ntohl(s->value));
|
||||||
|
|
||||||
|
@ -635,7 +634,7 @@ static int delete_dhcpd_rangeset(data19 *req, const char *pRequest) {
|
||||||
cfig.rangeCount = (char)resCount;
|
cfig.rangeCount = (char)resCount;
|
||||||
|
|
||||||
const char *pStrPro = proto_create_new(pRspRoot, 200);
|
const char *pStrPro = proto_create_new(pRspRoot, 200);
|
||||||
fp += sprintf(fp, "%s", pStrPro);
|
fp += sprintf(fp, "%s", pStrPro);
|
||||||
|
|
||||||
cJSON_Delete(pRoot);
|
cJSON_Delete(pRoot);
|
||||||
req->bytes = (int)(fp - req->dp);
|
req->bytes = (int)(fp - req->dp);
|
||||||
|
|
Loading…
Reference in New Issue