[dvblast-devel] Display hostname and port in getaddrinfo() error message.
Georgi Chorbadzhiyski
git at videolan.org
Tue Nov 19 04:59:03 CET 2013
dvblast | branch: master | Georgi Chorbadzhiyski <gf at unixsol.org> | Tue Nov 19 05:52:07 2013 +0200| [667360bf69f48720fd7446e31d6f77afb0877819] | committer: Georgi Chorbadzhiyski
Display hostname and port in getaddrinfo() error message.
Just reporting the error without the parameter value that causes it
makes it hard to see why there is a problem.
I spotted this trying to use ; (the correct one was #) to comment
lines in dvblast.conf and suddenly dvblast started complaining
about getaddrinfo() errors.
> http://git.videolan.org/gitweb.cgi/dvblast.git/?a=commit;h=667360bf69f48720fd7446e31d6f77afb0877819
---
util.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/util.c b/util.c
index 237f150..6a74de2 100644
--- a/util.c
+++ b/util.c
@@ -347,7 +347,8 @@ struct addrinfo *ParseNodeService( char *_psz_string, char **ppsz_end,
hint.ai_flags = AI_PASSIVE | AI_NUMERICHOST | AI_NUMERICSERV | AI_ADDRCONFIG;
if ( (i_ret = getaddrinfo( psz_node, psz_port, NULL, &p_res )) != 0 )
{
- msg_Warn( NULL, "getaddrinfo error: %s", gai_strerror(i_ret) );
+ msg_Warn( NULL, "getaddrinfo(host=%s, port=%s) error: %s",
+ psz_node, psz_port ? psz_port : "", gai_strerror(i_ret) );
free( psz_string );
return NULL;
}
More information about the dvblast-devel
mailing list