From 393ef213489dd559b1a9b00c93dfd444f59579ae Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Wed, 6 Sep 2023 09:32:26 +0800 Subject: [PATCH] add rpc update interface --- source/dnode/mnode/impl/src/mndUser.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/source/dnode/mnode/impl/src/mndUser.c b/source/dnode/mnode/impl/src/mndUser.c index 8f9b9889bb..5a40fb1e30 100644 --- a/source/dnode/mnode/impl/src/mndUser.c +++ b/source/dnode/mnode/impl/src/mndUser.c @@ -91,6 +91,15 @@ static void ipRangeListToStr(SIpV4Range *range, int32_t num, char *buf) { } if (len > 0) buf[len - 1] = 0; } +static bool isRangeInIpWhiteList(SIpWhiteList *pList, SIpV4Range *tgt) { + for (int i = 0; i < pList->num; i++) { + SIpV4Range *el = &pList->pIpRange[i]; + if (tgt->ip == el->ip && tgt->mask == el->mask) { + return true; + } + } + return false; +} int32_t convertIpWhiteListToStr(SIpWhiteList *pList, char **buf) { if (pList->num == 0) { *buf = NULL; @@ -170,15 +179,6 @@ static SIpWhiteList *cloneIpWhiteList(SIpWhiteList *pIpWhiteList) { memcpy(pNew, pIpWhiteList, sz); return pNew; } -static bool isRangeInIpWhiteList(SIpWhiteList *pList, SIpV4Range *tgt) { - for (int i = 0; i < pList->num; i++) { - SIpV4Range *el = &pList->pIpRange[i]; - if (tgt->ip == el->ip && tgt->mask == el->mask) { - return true; - } - } - return false; -} static int32_t mndCreateDefaultUser(SMnode *pMnode, char *acct, char *user, char *pass) { SUserObj userObj = {0};