aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_rpt.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-07-21 17:31:28 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-07-21 17:31:28 +0000
commitf395a52a02593f8556bd3786addc671d3f4250e0 (patch)
tree9a03027276c525f44c08eb5dc4d7b9035fa697c9 /apps/app_rpt.c
parentc7eeabcdd20eb9b7fad38b03cd0784854c0813c9 (diff)
Merge a new implementation of ast_inet_ntoa, our thread safe replacement for
inet_ntoa, which uses thread specific data (aka thread local storage) instead of stack allocatted buffers to store the result. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@38042 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_rpt.c')
-rw-r--r--apps/app_rpt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/app_rpt.c b/apps/app_rpt.c
index c724c86db..8449bd465 100644
--- a/apps/app_rpt.c
+++ b/apps/app_rpt.c
@@ -7505,7 +7505,7 @@ static int rpt_exec(struct ast_channel *chan, void *data)
return -1;
}
memcpy(&ia,hp->h_addr,sizeof(in_addr_t));
- ast_inet_ntoa(nodeip,sizeof(nodeip) - 1,ia);
+ ast_copy_string(nodeip, ast_inet_ntoa(ia), sizeof(nodeip));
if (strcmp(hisip,nodeip))
{
char *s3 = strchr(s1,'@');
@@ -7519,7 +7519,7 @@ static int rpt_exec(struct ast_channel *chan, void *data)
return -1;
}
memcpy(&ia,hp->h_addr,sizeof(in_addr_t));
- ast_inet_ntoa(nodeip,sizeof(nodeip) - 1,ia);
+ ast_copy_string(nodeip, ast_inet_ntoa(ia), sizeof(nodeip));
if (strcmp(hisip,nodeip))
{
ast_log(LOG_WARNING, "Node %s IP %s does not match link IP %s!!\n",b1,nodeip,hisip);