aboutsummaryrefslogtreecommitdiffstats
path: root/dnsmgr.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 /dnsmgr.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 'dnsmgr.c')
-rw-r--r--dnsmgr.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/dnsmgr.c b/dnsmgr.c
index 7115e3ed3..98b7f0905 100644
--- a/dnsmgr.c
+++ b/dnsmgr.c
@@ -172,10 +172,10 @@ static int dnsmgr_refresh(struct ast_dnsmgr_entry *entry, int verbose)
/* check to see if it has changed, do callback if requested (where de callback is defined ????) */
memcpy(&tmp, hp->h_addr, sizeof(tmp));
if (tmp.s_addr != entry->last.s_addr) {
+ ast_copy_string(iabuf, ast_inet_ntoa(entry->last), sizeof(iabuf));
+ ast_copy_string(iabuf2, ast_inet_ntoa(tmp), sizeof(iabuf2));
ast_log(LOG_NOTICE, "host '%s' changed from %s to %s\n",
- entry->name,
- ast_inet_ntoa(iabuf, sizeof(iabuf), entry->last),
- ast_inet_ntoa(iabuf2, sizeof(iabuf2), tmp));
+ entry->name, iabuf, iabuf2);
memcpy(entry->result, hp->h_addr, sizeof(entry->result));
memcpy(&entry->last, hp->h_addr, sizeof(entry->last));
changed = entry->changed = 1;