update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6482 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
1bbb57a82c
commit
5322410ec3
|
@ -670,17 +670,9 @@ static char RFC2833_CHARS[] = "0123456789*#ABCDF";
|
||||||
|
|
||||||
SWITCH_DECLARE(char *) get_addr(char *buf, switch_size_t len, struct in_addr *in)
|
SWITCH_DECLARE(char *) get_addr(char *buf, switch_size_t len, struct in_addr *in)
|
||||||
{
|
{
|
||||||
uint8_t x, *i;
|
assert(buf);
|
||||||
char *p = buf;
|
*buf = '\0';
|
||||||
|
inet_ntop(AF_INET, in, buf, len);
|
||||||
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue