[Freeswitch-svn] [commit] r6482 - freeswitch/trunk/src
Freeswitch SVN
anthm at freeswitch.org
Mon Dec 3 19:58:51 EST 2007
Author: anthm
Date: Mon Dec 3 19:58:51 2007
New Revision: 6482
Modified:
freeswitch/trunk/src/switch_utils.c
Log:
update
Modified: freeswitch/trunk/src/switch_utils.c
==============================================================================
--- freeswitch/trunk/src/switch_utils.c (original)
+++ freeswitch/trunk/src/switch_utils.c Mon Dec 3 19:58:51 2007
@@ -670,17 +670,9 @@
SWITCH_DECLARE(char *) get_addr(char *buf, switch_size_t len, struct in_addr *in)
{
- uint8_t x, *i;
- char *p = buf;
-
-
- i = (uint8_t *) in;
-
- memset(buf, 0, len);
- for (x = 0; x < 4; x++) {
- sprintf(p, "%u%s", i[x], x == 3 ? "" : ".");
- p = buf + strlen(buf);
- }
+ assert(buf);
+ *buf = '\0';
+ inet_ntop(AF_INET, in, buf, len);
return buf;
}
More information about the Freeswitch-svn
mailing list