mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-20 08:40:16 +00:00
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
This commit is contained in:
7
acl.c
7
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)
|
||||
|
||||
Reference in New Issue
Block a user