diff src/protocols/toc/toc.c @ 6982:083d1e4a9c78

[gaim-migrate @ 7538] This is Mr. Holland's Opus. And by Mr. Holland I mean Robot101. He rewrote the coreish IM image support so that the binary data gets ripped out in the prpl and put in an imgstore instead of just being passed in the same huge as char string as the actual message. This is good because it's prpl agnostic, or something. It also means we don't have a silly length of "-1" with pretty much every send or receive IM function. It should be crash free, bug free, and memleak free, but additional testing is always a good thing. If you like good stuff then you'll love this patch. But don't take my word for it--ba dun dunt! committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sat, 27 Sep 2003 19:17:21 +0000
parents 1c4e4c725e0d
children 86ed8b2aa665
line wrap: on
line diff
--- a/src/protocols/toc/toc.c	Sat Sep 27 15:45:49 2003 +0000
+++ b/src/protocols/toc/toc.c	Sat Sep 27 19:17:21 2003 +0000
@@ -740,7 +740,7 @@
 
 		a = (away && (*away == 'T')) ? GAIM_IM_AUTO_RESP : 0;
 
-		serv_got_im(gc, c, message, a, time(NULL), -1);
+		serv_got_im(gc, c, message, a, time(NULL));
 	} else if (!g_ascii_strcasecmp(c, "UPDATE_BUDDY")) {
 		char *l, *uc, *tmp;
 		int logged, evil, idle, type = 0;
@@ -1059,7 +1059,7 @@
 	}
 }
 
-static int toc_send_im(GaimConnection *gc, const char *name, const char *message, int len, GaimImFlags flags)
+static int toc_send_im(GaimConnection *gc, const char *name, const char *message, GaimImFlags flags)
 {
 	char *buf1, *buf2;
 
@@ -1089,7 +1089,7 @@
 	 * that length is passed to sflap_send().
 	 */
 
-	if (len + 52 > MSG_LEN) {
+	if (strlen(buf1) + 52 > MSG_LEN) {
 		g_free(buf1);
 		return -E2BIG;
 	}