diff libgaim/protocols/toc/toc.c @ 14542:8ed6ef220b2d

[gaim-migrate @ 17263] send_raw() prpl function allows plugins with knowledge of a protocol to send its own custom packets. Not practical for all protocols, but should be super useful on Jabber when coupled with Nathan's signals. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Tue, 12 Sep 2006 21:57:15 +0000
parents 60b1bc8dbf37
children 118fd0dc5b6e
line wrap: on
line diff
--- a/libgaim/protocols/toc/toc.c	Tue Sep 12 20:11:56 2006 +0000
+++ b/libgaim/protocols/toc/toc.c	Tue Sep 12 21:57:15 2006 +0000
@@ -414,6 +414,11 @@
 	return ret;
 }
 
+static int toc_send_raw(GaimConnection *gc, const char *buf, int len)
+{
+	return sflap_send(gc, buf, len, 2);
+}
+
 static int wait_reply(GaimConnection *gc, char *buffer, size_t buflen)
 {
 	struct toc_data *tdt = (struct toc_data *)gc->proto_data;
@@ -2068,7 +2073,7 @@
 	hdr->magic[0] = 'O'; hdr->magic[1] = 'F'; hdr->magic[2] = 'T'; hdr->magic[3] = '2';
 	hdr->hdrlen = htons(256);
 	hdr->hdrtype = htons(0x1108);
-	frombase64(ft->cookie, &buf, NULL);
+	rombase64(ft->cookie, &buf, NULL);
 	g_snprintf(hdr->bcookie, 8, "%s", buf);
 	g_free(buf);
 	hdr->totfiles = htons(1); hdr->filesleft = htons(1);
@@ -2300,6 +2305,7 @@
 	NULL,					/* new_xfer */
 	NULL,					/* offline_message */
 	NULL,					/* whiteboard_prpl_ops */
+	toc_send_raw,				/* send_raw */
 };
 
 static GaimPluginInfo info =