diff options
author | Russell Bryant <russell@russellbryant.com> | 2006-07-21 17:31:28 +0000 |
---|---|---|
committer | Russell Bryant <russell@russellbryant.com> | 2006-07-21 17:31:28 +0000 |
commit | ca9ba719b6f4ef598bc3dc71bdee05d11d0c7687 (patch) | |
tree | 9a03027276c525f44c08eb5dc4d7b9035fa697c9 /apps | |
parent | 1861dcdff5666cbac27288f7bdfdf40104d29d4d (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: https://origsvn.digium.com/svn/asterisk/trunk@38042 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps')
-rw-r--r-- | apps/app_rpt.c | 4 |
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); |