diff src/core.c @ 2482:7e4757801725

[gaim-migrate @ 2495] further updates to gaim-core. ui connects now and protocol basics seem to be working. this should facilitate cui dev. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Thu, 11 Oct 2001 07:19:20 +0000
parents cf2f2450f7cc
children b4ac3b5f484b
line wrap: on
line diff
--- a/src/core.c	Thu Oct 11 01:57:27 2001 +0000
+++ b/src/core.c	Thu Oct 11 07:19:20 2001 +0000
@@ -73,6 +73,8 @@
 		size = va_arg(args2, int);
 	}
 
+	pos -= sizeof(guchar) * 2 + 4;
+
 	/* now we do size */
 	memcpy(buffer + sizeof(guchar) * 2, &pos, 4);
 
@@ -83,14 +85,9 @@
 
 gint UI_write(struct UI *ui, guchar *data, gint len)
 {
-	guchar *send = g_new0(guchar, len + 6);
 	gint sent;
-	send[0] = 'f';
-	send[1] = 1;
-	memcpy(send + 2, &len, sizeof(len));
-	memcpy(send + 6, data, len);
 	/* we'll let the write silently fail because the read will pick it up as dead */
-	g_io_channel_write(ui->channel, send, len + 6, &sent);
+	g_io_channel_write(ui->channel, data, len, &sent);
 	return sent;
 }