summaryrefslogtreecommitdiff
path: root/acl.c
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2006-07-21 17:31:28 +0000
committerRussell Bryant <russell@russellbryant.com>2006-07-21 17:31:28 +0000
commitca9ba719b6f4ef598bc3dc71bdee05d11d0c7687 (patch)
tree9a03027276c525f44c08eb5dc4d7b9035fa697c9 /acl.c
parent1861dcdff5666cbac27288f7bdfdf40104d29d4d (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 'acl.c')
-rw-r--r--acl.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/acl.c b/acl.c
index 15057aa24..f3fd5097a 100644
--- a/acl.c
+++ b/acl.c
@@ -208,10 +208,9 @@ int ast_apply_ha(struct ast_ha *ha, struct sockaddr_in *sin)
char iabuf[INET_ADDRSTRLEN];
char iabuf2[INET_ADDRSTRLEN];
/* DEBUG */
- ast_log(LOG_DEBUG,
- "##### Testing %s with %s\n",
- ast_inet_ntoa(iabuf, sizeof(iabuf), sin->sin_addr),
- ast_inet_ntoa(iabuf2, sizeof(iabuf2), ha->netaddr));
+ ast_copy_string(iabuf, ast_inet_ntoa(sin->sin_addr), sizeof(iabuf));
+ ast_copy_string(iabuf2, ast_inet_ntoa(ha->netaddr), sizeof(iabuf2));
+ ast_log(LOG_DEBUG, "##### Testing %s with %s\n", iabuf, iabuf2);
/* For each rule, if this address and the netmask = the net address
apply the current rule */
if ((sin->sin_addr.s_addr & ha->netmask.s_addr) == ha->netaddr.s_addr)