diff src/protocols/jabber/jabber.c @ 8312:ba12d8b12ab0

[gaim-migrate @ 9036] I think this is preliminary jabber file sending support. I can't test it because the new network listening stuff is broken if you run both IPv4 and IPv6. If someone with a more "normal" setup can let me know if this works, I'd appreciate it. Note that it's not completely implemented yet, so sending via a proxy server doesn't work, cancelling transfers doesn't work, error handling isn't there, and it probably leaks memory. A sane person might even wonder why I'm committing this. Oh well. committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Sat, 21 Feb 2004 23:59:49 +0000
parents dd6fe7d965aa
children 8d012c803411
line wrap: on
line diff
--- a/src/protocols/jabber/jabber.c	Sat Feb 21 20:59:07 2004 +0000
+++ b/src/protocols/jabber/jabber.c	Sat Feb 21 23:59:49 2004 +0000
@@ -34,6 +34,7 @@
 #include "auth.h"
 #include "buddy.h"
 #include "chat.h"
+#include "disco.h"
 #include "iq.h"
 #include "jutil.h"
 #include "message.h"
@@ -386,7 +387,9 @@
 	js = gc->proto_data = g_new0(JabberStream, 1);
 	js->gc = gc;
 	js->fd = -1;
-	js->callbacks = g_hash_table_new_full(g_str_hash, g_str_equal,
+	js->iq_callbacks = g_hash_table_new_full(g_str_hash, g_str_equal,
+			g_free, g_free);
+	js->disco_callbacks = g_hash_table_new_full(g_str_hash, g_str_equal,
 			g_free, g_free);
 	js->buddies = g_hash_table_new_full(g_str_hash, g_str_equal,
 			g_free, (GDestroyNotify)jabber_buddy_free);
@@ -718,7 +721,9 @@
 	js = gc->proto_data = g_new0(JabberStream, 1);
 	js->gc = gc;
 	js->registration = TRUE;
-	js->callbacks = g_hash_table_new_full(g_str_hash, g_str_equal,
+	js->iq_callbacks = g_hash_table_new_full(g_str_hash, g_str_equal,
+			g_free, g_free);
+	js->disco_callbacks = g_hash_table_new_full(g_str_hash, g_str_equal,
 			g_free, g_free);
 	js->user = jabber_id_new(gaim_account_get_username(account));
 	js->next_id = g_random_int();
@@ -781,8 +786,10 @@
 
 	if(js->context)
 		g_markup_parse_context_free(js->context);
-	if(js->callbacks)
-		g_hash_table_destroy(js->callbacks);
+	if(js->iq_callbacks)
+		g_hash_table_destroy(js->iq_callbacks);
+	if(js->disco_callbacks)
+		g_hash_table_destroy(js->disco_callbacks);
 	if(js->buddies)
 		g_hash_table_destroy(js->buddies);
 	if(js->chats)
@@ -832,7 +839,7 @@
 			gaim_connection_set_state(js->gc, GAIM_CONNECTED);
 			jabber_roster_request(js);
 			jabber_presence_send(js->gc, js->gc->away_state, js->gc->away);
-			jabber_iq_disco_server(js);
+			jabber_disco_items_server(js);
 			serv_finish_login(js->gc);
 			break;
 	}