fix MODAPP-113

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9016 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale committed 2008-07-14 16:32:56 +00:00
1 parent d6022f302a
commit b46693e3ca
2 files changed
+6 -1

No files matched your search

+4 -1
View File
@@ -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;