diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-07-21 17:31:28 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-07-21 17:31:28 +0000 |
commit | f395a52a02593f8556bd3786addc671d3f4250e0 (patch) | |
tree | 9a03027276c525f44c08eb5dc4d7b9035fa697c9 /dnsmgr.c | |
parent | c7eeabcdd20eb9b7fad38b03cd0784854c0813c9 (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.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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; |