OCT 修正删除DHCP地址池功能存在的问题
This commit is contained in:
parent
a28fc7a21a
commit
13434794ac
|
@ -594,7 +594,6 @@ static int delete_dhcpd_rangeset(data19 *req, const char *pRequest) {
|
|||
|
||||
HASH_DEL(delMap, delRange);
|
||||
} else {
|
||||
//Write dhcpRanges
|
||||
memcpy(&dhcpRanges[resCount], &cfig.dhcpRanges[i], sizeof(struct data13));
|
||||
resCount++;
|
||||
}
|
||||
|
@ -602,7 +601,6 @@ static int delete_dhcpd_rangeset(data19 *req, const char *pRequest) {
|
|||
|
||||
//The input parameter does not exist
|
||||
if (resCount > cfig.rangeCount - cJSON_GetArraySize(pdhcp_range)) {
|
||||
cJSON *pdel_Item = cJSON_CreateObject();
|
||||
auto *s = (PHASH_MAP)malloc(sizeof(HASH_MAP));
|
||||
PHASH_MAP tmp;
|
||||
char saddr[128];
|
||||
|
@ -611,6 +609,7 @@ static int delete_dhcpd_rangeset(data19 *req, const char *pRequest) {
|
|||
memset(del_range, 0, 256);
|
||||
|
||||
HASH_ITER(hh, delMap, s, tmp) {
|
||||
cJSON *pdel_Item = cJSON_CreateObject();
|
||||
IP2String(saddr, ntohl(s->key));
|
||||
IP2String(eaddr, ntohl(s->value));
|
||||
|
||||
|
|
Loading…
Reference in New Issue