diff src/protocols/irc/irc.c @ 4452:2afc0f845e74

[gaim-migrate @ 4727] I cleaned up the async dns stuff a bit. Now everything will work again. Even TOC. You don't want to use TOC, though--but you already know that. You're smart. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Tue, 28 Jan 2003 21:42:44 +0000
parents 2fd80799d8f4
children 1630b1dca931
line wrap: on
line diff
--- a/src/protocols/irc/irc.c	Tue Jan 28 18:49:42 2003 +0000
+++ b/src/protocols/irc/irc.c	Tue Jan 28 21:42:44 2003 +0000
@@ -1664,12 +1664,12 @@
 
 	idata = gc->proto_data;
 
-	if (source == -1) {
+	if (source != 1) {
 		hide_login_progress(gc, "Write error");
 		signoff(gc);
 		return;
 	}
-
+	idata->fd = source;
 	
 	/* Try a quick conversion to see if the specified encoding is OK */
 	test = g_convert("test", strlen("test"), gc->user->proto_opt[USEROPT_CHARSET],
@@ -1682,8 +1682,6 @@
 	
 	g_free(test);
 	
-	idata->fd = source;
-
 	gethostname(hostname, sizeof(hostname) - 1);
 	hostname[sizeof(hostname) - 1] = 0;
 	if (!*hostname)
@@ -1740,10 +1738,9 @@
 	idata->fd = -1;
 
 	rc = proxy_connect(user->proto_opt[USEROPT_SERV],
-				  user->proto_opt[USEROPT_PORT][0] ? atoi(user->
-									  proto_opt[USEROPT_PORT]) :
-				  6667, irc_login_callback, gc);
-	if (!user->gc || (rc < 0)) {
+				  user->proto_opt[USEROPT_PORT][0] ? atoi(user->proto_opt[USEROPT_PORT]) :
+								     6667, irc_login_callback, gc);
+	if (!user->gc || (rc != 0)) {
 		hide_login_progress(gc, "Unable to create socket");
 		signoff(gc);
 		return;