diff libfaim/aim_im.c @ 283:0f14e6d8a51b

[gaim-migrate @ 293] - Good fun things here. Sometimes I think Adam does things just to make it difficult for me, I swear (j/k :) ). - I moved all the .h files into the faim/ directory because I'm tired of changing faim/aim.h to just aim.h every time Adam makes an update. - libfaim can now send messages much longer than WinAIM or TOC can. But, the length checking code is still in conversation.c, and I haven't changed it yet, mostly because I'm lazy. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Wed, 31 May 2000 03:20:11 +0000
parents 6ced2f1c8b24
children bafaf1b68f9a
line wrap: on
line diff
--- a/libfaim/aim_im.c	Wed May 31 00:57:39 2000 +0000
+++ b/libfaim/aim_im.c	Wed May 31 03:20:11 2000 +0000
@@ -5,7 +5,7 @@
  *
  */
 
-#include <aim.h>
+#include <faim/aim.h>
 
 /*
  * Send an ICBM (instant message).  
@@ -25,7 +25,10 @@
   int curbyte,i;
   struct command_tx_struct *newpacket;
   
-  if (!(newpacket = aim_tx_new(0x0002, conn, 1152)))
+  if (strlen(msg) >= MAXMSGLEN)
+    return -1;
+
+  if (!(newpacket = aim_tx_new(0x0002, conn, strlen(msg)+256)))
     return -1;
 
   newpacket->lock = 1; /* lock struct */