mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-28 22:24:16 +00:00
fix MODAPP-113
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9016 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
d6022f302a
commit
b46693e3ca
2 files changed
+6
-1
No files matched your search
+4
-1
@@ -169,7 +169,10 @@ SWITCH_DECLARE(int) switch_parse_cidr(const char *string, uint32_t *ip, uint32_t
|
||||
|
||||
bits = atoi(bit_str);
|
||||
switch_inet_pton(AF_INET, host, ip);
|
||||
*mask = 0xFFFFFFFF & ~(0xFFFFFFFF << bits);
|
||||
*ip = htonl(*ip);
|
||||
|
||||
*mask = 0xFFFFFFFF & ~(0xFFFFFFFF >> bits);
|
||||
|
||||
*bitp = bits;
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in new issue
Block a user