mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-25 14:06:27 +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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user