]> andersk Git - libfaim.git/commitdiff
- Wed May 31 01:17:24 UTC 2000
authormid <mid>
Wed, 31 May 2000 01:21:44 +0000 (01:21 +0000)
committermid <mid>
Wed, 31 May 2000 01:21:44 +0000 (01:21 +0000)
   - Added constants for message sizes (MAXMSGLEN, MAXCHATMSGLEN)
     - Note that the new max message size is defined as 7988bytes,
         drastically larger than WinAIM lets you put out.  This is a
         libfaim-exclusive feature :)
   - Reduced base buffer size on aim_send_im()

CHANGES
aim_im.c
aim_meta.c
faim/aim.h
mkbuildinfo.sh

diff --git a/CHANGES b/CHANGES
index d8ac39f66599a19a9d978efc9666a6ebc358a929..f49d5b6c73ca7ece7c556a753f9ddbf4c7ac9d6b 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,13 @@
 
 No release numbers
 ------------------
+ - Wed May 31 01:17:24 UTC 2000
+   - Added constants for message sizes (MAXMSGLEN, MAXCHATMSGLEN)
+     - Note that the new max message size is defined as 7988bytes,
+         drastically larger than WinAIM lets you put out.  This is a
+         libfaim-exclusive feature :)
+   - Reduced base buffer size on aim_send_im()  
  - Tue May 30 22:32:31 UTC 2000
    - Added lock around tx seqnum to prevent that race when transmitting
        from diverse threads. (actually committed earlier today)
index 7f95181bc7855d5d84198866ba5b65d38967346b..586a738a275f51e734a66003a16bff0ae8191175 100644 (file)
--- a/aim_im.c
+++ b/aim_im.c
@@ -25,7 +25,10 @@ u_long aim_send_im(struct aim_session_t *sess,
   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 */
index cb001872b1a8f3102bcad2495ffdb90657305b02..3b054f162de54900326df60f75ebfe019526f983 100644 (file)
@@ -7,12 +7,12 @@
 #include <faim/aim.h>
 #include <aim_buildcode.h> /* generated by mkbuildinfo.sh */
 
-long long aim_getbuilddate(void)
+char *aim_getbuilddate(void)
 {
   return AIM_BUILDDATE;
 }
 
-long long aim_getbuildtime(void)
+char *aim_getbuildtime(void)
 {
   return AIM_BUILDTIME;
 }
@@ -21,7 +21,7 @@ char *aim_getbuildstring(void)
 {
   static char string[100];
 
-  snprintf(string, 99, "%d.%d.%d-%Ld%Ld", 
+  snprintf(string, 99, "%d.%d.%d-%s%s", 
           FAIM_VERSION_MAJOR,
           FAIM_VERSION_MINOR,
           FAIM_VERSION_MINORMINOR,
index e4e995ecabfa617fe09084f21449594d56f7bf7a..498fa5fcd32159a5265212aafb0280cf336e779c 100644 (file)
  */
 #define MAXSNLEN 16
 
+/*
+ * Current Maximum Length for Instant Messages
+ *
+ * This was found basically by experiment, but not wholly
+ * accurate experiment.  It should not be regarded
+ * as completely correct.  But its a decent approximation.
+ *
+ * Note that although we can send this much, its impossible
+ * for WinAIM clients (up through the latest (4.0.1957)) to
+ * send any more than 1kb.  Amaze all your windows friends
+ * with uterrly oversized instant messages!
+ * 
+ */
+#define MAXMSGLEN 7988
+
+/*
+ * Current Maximum Length for Chat Room Messages
+ *
+ * This is actually defined by the protocol to be
+ * dynamic, but I have yet to see due cause to 
+ * define it dynamically here.  Maybe later.
+ *
+ */
+#define MAXCHATMSGLEN 512
+
 /*
  * Standard size of an AIM authorization cookie
  */
@@ -529,8 +554,8 @@ int aim_snlen(const char *sn);
 int aim_sncmp(const char *sn1, const char *sn2);
 
 /* aim_meta.c */
-long long aim_getbuilddate(void);
-long long aim_getbuildtime(void);
+char *aim_getbuilddate(void);
+char *aim_getbuildtime(void);
 char *aim_getbuildstring(void);
 
 #endif /* __AIM_H__ */
index 5eb1c4fdc8518b46e8d616733161d60e3c65b043..ed36c5a7499db4925bb31e2da42e0b04e266548f 100755 (executable)
@@ -1,6 +1,10 @@
 #!/bin/bash
 rm -rf aim_meta.o aim_buildcode.h
-echo -n "#define AIM_BUILDDATE " > aim_buildcode.h
-echo `date +%Y%m%e` >> aim_buildcode.h
-echo -n "#define AIM_BUILDTIME " >> aim_buildcode.h
-echo `date +%H%M%S` >> aim_buildcode.h
+
+echo -n "#define AIM_BUILDDATE \"" > aim_buildcode.h
+echo -n `date +%Y%m%e` >> aim_buildcode.h
+echo "\"" >> aim_buildcode.h
+
+echo -n "#define AIM_BUILDTIME \"" >> aim_buildcode.h
+echo -n `date +%H%M%S` >> aim_buildcode.h
+echo "\"" >> aim_buildcode.h
\ No newline at end of file
This page took 0.106609 seconds and 5 git commands to generate.