changeset 6905:90cfd31c506f

[gaim-migrate @ 7452] Minor changes to some of the connection establishment stuff in oscar.c, nothing externally visible. Move along, move along. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sun, 21 Sep 2003 21:08:51 +0000
parents 7c3a11c69be9
children 567991b90cee
files src/protocols/oscar/oscar.c src/protocols/oscar/rxhandlers.c
diffstat 2 files changed, 6 insertions(+), 40 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/oscar/oscar.c	Sun Sep 21 20:57:19 2003 +0000
+++ b/src/protocols/oscar/oscar.c	Sun Sep 21 21:08:51 2003 +0000
@@ -758,8 +758,6 @@
 	if (od->icopa > 0)
 		gaim_input_remove(od->icopa);
 	if (od->icopa > 0)
-		gaim_input_remove(od->icopa);
-	if (od->icontimer)
 		g_source_remove(od->icontimer);
 	if (od->getblisttimer)
 		g_source_remove(od->getblisttimer);
@@ -1375,7 +1373,7 @@
 	struct chat_connection *chatcon;
 	static int id = 1;
 
-	aim_conn_addhandler(sess, fr->conn, 0x000e, 0x0001, gaim_parse_genericerr, 0);
+	aim_conn_addhandler(sess, fr->conn, AIM_CB_FAM_CHT, 0x0001, gaim_parse_genericerr, 0);
 	aim_conn_addhandler(sess, fr->conn, AIM_CB_FAM_CHT, AIM_CB_CHT_USERJOIN, gaim_chat_join, 0);
 	aim_conn_addhandler(sess, fr->conn, AIM_CB_FAM_CHT, AIM_CB_CHT_USERLEAVE, gaim_chat_leave, 0);
 	aim_conn_addhandler(sess, fr->conn, AIM_CB_FAM_CHT, AIM_CB_CHT_ROOMINFOUPDATE, gaim_chat_info_update, 0);
@@ -1487,7 +1485,7 @@
 
 	aim_conn_completeconnect(sess, tstconn);
 	od->paspa = gaim_input_add(tstconn->fd, GAIM_INPUT_READ, oscar_callback, tstconn);
-	gaim_debug(GAIM_DEBUG_INFO, "oscar", "chatnav: connected\n");
+	gaim_debug(GAIM_DEBUG_INFO, "oscar", "admin: connected\n");
 }
 
 static void oscar_chat_connect(gpointer data, gint source, GaimInputCondition cond)
@@ -1619,9 +1617,6 @@
 		}
 		aim_conn_addhandler(sess, tstconn, AIM_CB_FAM_SPECIAL, AIM_CB_SPECIAL_CONNERR, gaim_connerr, 0);
 		aim_conn_addhandler(sess, tstconn, AIM_CB_FAM_SPECIAL, AIM_CB_SPECIAL_CONNINITDONE, conninitdone_admin, 0);
-		aim_conn_addhandler(sess, tstconn, 0x0007, 0x0003, gaim_info_change, 0);
-		aim_conn_addhandler(sess, tstconn, 0x0007, 0x0005, gaim_info_change, 0);
-		aim_conn_addhandler(sess, tstconn, 0x0007, 0x0007, gaim_account_confirm, 0);
 
 		tstconn->status |= AIM_CONN_STATUS_INPROGRESS;
 		if (gaim_proxy_connect(account, host, port, oscar_auth_connect, gc) != 0) {
@@ -3766,6 +3761,10 @@
 	GaimConnection *gc = sess->aux_data;
 	struct oscar_data *od = gc->proto_data;
 
+	aim_conn_addhandler(sess, fr->conn, AIM_CB_FAM_ADM, 0x0003, gaim_info_change, 0);
+	aim_conn_addhandler(sess, fr->conn, AIM_CB_FAM_ADM, 0x0005, gaim_info_change, 0);
+	aim_conn_addhandler(sess, fr->conn, AIM_CB_FAM_ADM, 0x0007, gaim_account_confirm, 0);
+
 	aim_clientready(sess, fr->conn);
 	gaim_debug(GAIM_DEBUG_INFO, "oscar", "connected to admin\n");
 
--- a/src/protocols/oscar/rxhandlers.c	Sun Sep 21 20:57:19 2003 +0000
+++ b/src/protocols/oscar/rxhandlers.c	Sun Sep 21 21:08:51 2003 +0000
@@ -391,34 +391,6 @@
 	return 1;
 }
 
-/*
- * Some SNACs we do not allow to be hooked, for good reason.
- */
-static int checkdisallowed(fu16_t group, fu16_t type)
-{
-	static const struct {
-		fu16_t group;
-		fu16_t type;
-	} dontuse[] = {
-		{0x0001, 0x0002},
-		{0x0001, 0x0003},
-		{0x0001, 0x0006},
-		{0x0001, 0x0007},
-		{0x0001, 0x0008},
-		{0x0001, 0x0017},
-		{0x0001, 0x0018},
-		{0x0000, 0x0000}
-	};
-	int i;
-
-	for (i = 0; dontuse[i].group != 0x0000; i++) {
-		if ((dontuse[i].group == group) && (dontuse[i].type == type))
-			return 1;
-	}
-
-	return 0;
-}
-
 faim_export int aim_conn_addhandler(aim_session_t *sess, aim_conn_t *conn, fu16_t family, fu16_t type, aim_rxcallback_t newhandler, fu16_t flags)
 {
 	struct aim_rxcblist_s *newcb;
@@ -428,11 +400,6 @@
 
 	faimdprintf(sess, 1, "aim_conn_addhandler: adding for %04x/%04x\n", family, type);
 
-	if (checkdisallowed(family, type)) {
-		faimdprintf(sess, 0, "aim_conn_addhandler: client tried to hook %x/%x -- BUG!!!\n", family, type);
-		return -1;
-	}
-
 	if (!(newcb = (struct aim_rxcblist_s *)calloc(1, sizeof(struct aim_rxcblist_s))))
 		return -1;