fix sip transaction match with authentication, fix confusing log message when using getaddrinfo

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@279817 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
David Vossel
2010-07-27 16:09:15 +00:00
parent ccfad47983
commit ab374d0446
2 changed files with 6 additions and 5 deletions

View File

@@ -201,8 +201,10 @@ int ast_sockaddr_parse(struct ast_sockaddr *addr, const char *str, int flags)
hints.ai_flags = AI_NUMERICHOST;
#endif
if ((e = getaddrinfo(host, port, &hints, &res))) {
ast_log(LOG_ERROR, "getaddrinfo(\"%s\", \"%s\", ...): %s\n",
host, S_OR(port, "(null)"), gai_strerror(e));
if (e != EAI_NONAME) { /* if this was just a host name rather than a ip address, don't print error */
ast_log(LOG_ERROR, "getaddrinfo(\"%s\", \"%s\", ...): %s\n",
host, S_OR(port, "(null)"), gai_strerror(e));
}
return 0;
}