[gaim-migrate @ 2155]

Wed, 15 Aug 2001 19:23:03 +0000

author
Valdis Kletnieks
date
Wed, 15 Aug 2001 19:23:03 +0000
changeset 2145
6141a0917e12
parent 2144
6d6bb304043a
child 2146
7f59b583d8ce

[gaim-migrate @ 2155]
thanks to Valdis Kletnieks for pointing this out.

committer: Eric Warmenhoven <warmenhoven@yahoo.com>

src/protocols/yahoo/conn.c file | annotate | diff | comparison | revisions
src/protocols/yahoo/yay.c file | annotate | diff | comparison | revisions
--- a/src/protocols/yahoo/conn.c	Wed Aug 15 18:09:48 2001 +0000
+++ b/src/protocols/yahoo/conn.c	Wed Aug 15 19:23:03 2001 +0000
@@ -19,6 +19,7 @@
  *
  */
 
+#include <string.h>
 #include "internal.h"
 
 void (*yahoo_socket_notify)(struct yahoo_session *, int, int, gboolean) = NULL;
@@ -97,10 +98,12 @@
 	conn->connected = TRUE;
 	if (conn->type == YAHOO_CONN_TYPE_AUTH) {
 		if (session->callbacks[YAHOO_HANDLE_AUTHCONNECT].function)
-			(*session->callbacks[YAHOO_HANDLE_AUTHCONNECT].function)(session);
+			if (!(*session->callbacks[YAHOO_HANDLE_AUTHCONNECT].function)(session))
+				return 0;
 	} else if (conn->type == YAHOO_CONN_TYPE_MAIN) {
 		if (session->callbacks[YAHOO_HANDLE_MAINCONNECT].function)
-			(*session->callbacks[YAHOO_HANDLE_MAINCONNECT].function)(session);
+			if (!(*session->callbacks[YAHOO_HANDLE_MAINCONNECT].function)(session))
+				return 0;
 	} else if (conn->type == YAHOO_CONN_TYPE_DUMB) {
 		YAHOO_PRINT(session, YAHOO_LOG_DEBUG, "sending to buddy list host");
 		yahoo_write(session, conn, conn->txqueue, strlen(conn->txqueue));
--- a/src/protocols/yahoo/yay.c	Wed Aug 15 18:09:48 2001 +0000
+++ b/src/protocols/yahoo/yay.c	Wed Aug 15 19:23:03 2001 +0000
@@ -267,6 +267,7 @@
 	if (yahoo_send_login(sess, gc->username, gc->password) < 1) {
 		hide_login_progress(gc, "Authorizer error");
 		signoff(gc);
+		return 0;
 	}
 
 	return 1;
@@ -301,6 +302,7 @@
 	if (yahoo_finish_logon(sess, YAHOO_STATUS_AVAILABLE) < 1) {
 		hide_login_progress(gc, "Login error");
 		signoff(gc);
+		return 0;
 	}
 
 	if (bud_list_cache_exists(gc))

mercurial