diff src/connection.c @ 5564:187c740f2a4e

[gaim-migrate @ 5966] Committing what I have so far. Some new functions, and msn is almost done. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Fri, 30 May 2003 18:04:45 +0000
parents 9eb5b13fd412
children 113090160626
line wrap: on
line diff
--- a/src/connection.c	Fri May 30 09:38:29 2003 +0000
+++ b/src/connection.c	Fri May 30 18:04:45 2003 +0000
@@ -23,6 +23,7 @@
 #include "connection.h"
 
 static GList *connections = NULL;
+static GList *connections_connecting = NULL;
 static GaimConnectionUiOps *connection_ui_ops = NULL;
 
 GaimConnection *
@@ -172,6 +173,8 @@
 		/* Set the time the account came online */
 		time(&gc->login_time);
 
+		connections_connecting = g_list_append(connections_connecting, gc);
+
 		if (ops != NULL && ops->connected != NULL)
 			ops->connected(gc);
 
@@ -231,6 +234,9 @@
 
 		serv_set_permit_deny(gc);
 	}
+	else {
+		connections_connecting = g_list_remove(connections_connecting, gc);
+	}
 }
 
 void
@@ -295,6 +301,24 @@
 }
 
 void
+gaim_connection_error(GaimConnection *gc, const char *text)
+{
+	GaimConnectionUiOps *ops;
+
+	g_return_if_fail(gc   != NULL);
+	g_return_if_fail(text != NULL);
+
+	ops = gaim_get_connection_ui_ops();
+
+	gaim_connection_disconnect(gc);
+
+	if (ops != NULL && ops->disconnected != NULL)
+		ops->disconnected(gc, text);
+
+	gaim_connection_destroy(gc);
+}
+
+void
 gaim_connections_disconnect_all(void)
 {
 	GList *l;