changeset 8977:52fba1dafe0e

[gaim-migrate @ 9751] Remove calls to hstrerror. It's obsolete... but Gaim only uses it on systems that don't have getaddrinfo. This sould have only been a problem on a very small number of systems. See http://sourceforge.net/tracker/?func=detail&aid=772026&group_id=235&atid=100235 for more info. You can major in gun repair. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Wed, 19 May 2004 04:41:01 +0000
parents 6f21aa413b18
children 8e69a730885c
files src/proxy.c
diffstat 1 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/proxy.c	Wed May 19 04:02:08 2004 +0000
+++ b/src/proxy.c	Wed May 19 04:41:01 2004 +0000
@@ -323,13 +323,13 @@
 	rc=read(req->fd_out, &err, sizeof(err));
 	if((rc==4) && (err!=0)) {
 		char message[1024];
+#if HAVE_GETADDRINFO
 		g_snprintf(message, sizeof(message), "DNS error: %s (pid=%d)",
-#if HAVE_GETADDRINFO
-			gai_strerror(err),
+				   gai_strerror(err), req->dns_pid);
 #else
-			hstrerror(err),
+		g_snprintf(message, sizeof(message), "DNS error: %d (pid=%d)",
+				   err, req->dns_pid);
 #endif
-			req->dns_pid);
 		gaim_debug(GAIM_DEBUG_ERROR, "dns", "%s\n", message);
 		req->callback(NULL, req->data, message);
 		release_dns_child(req);
@@ -566,7 +566,7 @@
 						write(child_out[1], &h_errno, sizeof(int));
 						close(child_out[1]);
 						if(opt_debug)
-							fprintf(stderr,"DNS Error: %s\n",hstrerror(h_errno));
+							fprintf(stderr,"DNS Error: %d\n", h_errno);
 						_exit(0);
 					}
 					memset(&sin, 0, sizeof(struct sockaddr_in));
@@ -642,8 +642,8 @@
 		struct hostent *hp;
 		if(!(hp = gethostbyname(hostname))) {
 			gaim_debug(GAIM_DEBUG_ERROR, "dns",
-					   "gaim_gethostbyname(\"%s\", %d) failed: %s\n",
-					   hostname, port, hstrerror(h_errno));
+					   "gaim_gethostbyname(\"%s\", %d) failed: %d\n",
+					   hostname, port, h_errno);
 			return -1;
 		}
 		memset(&sin, 0, sizeof(struct sockaddr_in));