aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/netsock2.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/main/netsock2.c b/main/netsock2.c
index 52b8a8d39..929f4b337 100644
--- a/main/netsock2.c
+++ b/main/netsock2.c
@@ -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;
}