]> andersk Git - libfaim.git/commitdiff
- Wed Dec 13 00:38:56 UTC 2000
authormid <mid>
Wed, 13 Dec 2000 00:42:28 +0000 (00:42 +0000)
committermid <mid>
Wed, 13 Dec 2000 00:42:28 +0000 (00:42 +0000)
  - Added the client update/version info to the authresp callback
  - Added the prototype for aim_getfile_send_chunk to aim.h

CHANGES
aim_ft.c
aim_login.c
faim/aim.h
utils/faimtest/faimtest.c

diff --git a/CHANGES b/CHANGES
index 4f8bcf466e42ec1c92879436c21d524968baaf1e..5ee16cd56d88d893664f74f2ed2ab17aa22fc8a2 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,10 @@
 
 No release numbers
 ------------------
+ - Wed Dec 13 00:38:56 UTC 2000
+  - Added the client update/version info to the authresp callback
+  - Added the prototype for aim_getfile_send_chunk to aim.h
+
  - Tue Dec 12 23:02:41 UTC 2000
   - Got pissed off at sess->logininfo.  Got rid of it.
     - Now pass all that stuff in as varargs, like it should be.
index 8c296928628e72bd1d6a0e342b5e328a107b9110..b47eef68b9c2ebbab920745b2782b2cfa75903f9 100644 (file)
--- a/aim_ft.c
+++ b/aim_ft.c
@@ -1591,7 +1591,6 @@ faim_export int aim_getfile_send(struct aim_conn_t *conn, FILE *tosend, struct a
  * if (pos + chunksize > fh->size), we only send as much data as we
  *  can get (ie: up to fh->size.  
  */
-
 faim_export int aim_getfile_send_chunk(struct aim_conn_t *conn, FILE *tosend, struct aim_fileheader_t *fh, int pos, int bufsize)
 {
   int bufpos; 
index 4c4a2e6ff5ef22b03304c8405495b06b6fe5b207..2b5e92b41fc2132affafaf97c2a34ee1b7d5613c 100644 (file)
@@ -298,6 +298,10 @@ faim_internal int aim_authparse(struct aim_session_t *sess,
   char *sn = NULL, *bosip = NULL, *errurl = NULL, *email = NULL;
   unsigned char *cookie = NULL;
   int errorcode = 0, regstatus = 0;
+  int latestbuild = 0, latestbetabuild = 0;
+  char *latestrelease = NULL, *latestbeta = NULL;
+  char *latestreleaseurl = NULL, *latestbetaurl = NULL;
+  char *latestreleaseinfo = NULL, *latestbetainfo = NULL;
 
   /*
    * Read block of TLVs.  All further data is derived
@@ -361,9 +365,31 @@ faim_internal int aim_authparse(struct aim_session_t *sess,
   if (aim_gettlv(tlvlist, 0x0013, 1))
     regstatus = aim_gettlv16(tlvlist, 0x0013, 1);
 
+  if (aim_gettlv(tlvlist, 0x0040, 1))
+    latestbetabuild = aim_gettlv32(tlvlist, 0x0040, 1);
+  if (aim_gettlv(tlvlist, 0x0041, 1))
+    latestbetaurl = aim_gettlv_str(tlvlist, 0x0041, 1);
+  if (aim_gettlv(tlvlist, 0x0042, 1))
+    latestbetainfo = aim_gettlv_str(tlvlist, 0x0042, 1);
+  if (aim_gettlv(tlvlist, 0x0043, 1))
+    latestbeta = aim_gettlv_str(tlvlist, 0x0043, 1);
+  if (aim_gettlv(tlvlist, 0x0048, 1))
+    ; /* no idea what this is */
+
+  if (aim_gettlv(tlvlist, 0x0044, 1))
+    latestbuild = aim_gettlv32(tlvlist, 0x0044, 1);
+  if (aim_gettlv(tlvlist, 0x0045, 1))
+    latestreleaseurl = aim_gettlv_str(tlvlist, 0x0045, 1);
+  if (aim_gettlv(tlvlist, 0x0046, 1))
+    latestreleaseinfo = aim_gettlv_str(tlvlist, 0x0046, 1);
+  if (aim_gettlv(tlvlist, 0x0047, 1))
+    latestrelease = aim_gettlv_str(tlvlist, 0x0047, 1);
+  if (aim_gettlv(tlvlist, 0x0049, 1))
+    ; /* no idea what this is */
+
 
   if ((userfunc = aim_callhandler(command->conn, 0x0017, 0x0003)))
-    ret = userfunc(sess, command, sn, errorcode, errurl, regstatus, email, bosip, cookie);
+    ret = userfunc(sess, command, sn, errorcode, errurl, regstatus, email, bosip, cookie, latestrelease, latestbuild, latestreleaseurl, latestreleaseinfo, latestbeta, latestbetabuild, latestbetaurl, latestbetainfo);
 
 
   if (sn)
@@ -376,6 +402,19 @@ faim_internal int aim_authparse(struct aim_session_t *sess,
     free(email);
   if (cookie)
     free(cookie);
+  if (latestrelease)
+    free(latestrelease);
+  if (latestreleaseurl)
+    free(latestreleaseurl);
+  if (latestbeta)
+    free(latestbeta);
+  if (latestbetaurl)
+    free(latestbetaurl);
+  if (latestreleaseinfo)
+    free(latestreleaseinfo);
+  if (latestbetainfo)
+    free(latestbetainfo);
+
   aim_freetlvchain(&tlvlist);
 
   return ret;
index a83632d1eaaba70bb646fd787f1da8b14b46ffe3..0c960080fab708954af99622b4e1d6f839f68838 100644 (file)
@@ -447,6 +447,7 @@ faim_internal unsigned long aim_genericreq_s(struct aim_session_t *, struct aim_
 faim_internal struct aim_fileheader_t *aim_oft_getfh(unsigned char *hdr);
 faim_export int aim_oft_registerlisting(struct aim_session_t *sess, FILE *file, char* listingdir);
 faim_export int aim_getfile_send(struct aim_conn_t *conn, FILE *tosend, struct aim_fileheader_t *fh);
+faim_export int aim_getfile_send_chunk(struct aim_conn_t *conn, FILE *tosend, struct aim_fileheader_t *fh, int pos, int bufsize);
 
 /* aim_login.c */
 faim_export int aim_sendconnack(struct aim_session_t *sess, struct aim_conn_t *conn);
index a8b843791a66c0ad56d7ed9a4762c446203e9f3b..d101c9f88d15335a19905fd1671d6726d8d36294 100644 (file)
@@ -551,7 +551,11 @@ int faimtest_parse_authresp(struct aim_session_t *sess, struct command_rx_struct
   char *sn = NULL, *bosip = NULL, *errurl = NULL, *email = NULL;
   unsigned char *cookie = NULL;
   int errorcode = 0, regstatus = 0;
-  
+  int latestbuild = 0, latestbetabuild = 0;
+  char *latestrelease = NULL, *latestbeta = NULL;
+  char *latestreleaseurl = NULL, *latestbetaurl = NULL;
+  char *latestreleaseinfo = NULL, *latestbetainfo = NULL;
+
   va_start(ap, command);
   sn = va_arg(ap, char *);
   errorcode = va_arg(ap, int);
@@ -560,6 +564,17 @@ int faimtest_parse_authresp(struct aim_session_t *sess, struct command_rx_struct
   email = va_arg(ap, char *);
   bosip = va_arg(ap, char *);
   cookie = va_arg(ap, unsigned char *);
+
+  latestrelease = va_arg(ap, char *);
+  latestbuild = va_arg(ap, int);
+  latestreleaseurl = va_arg(ap, char *);
+  latestreleaseinfo = va_arg(ap, char *);
+
+  latestbeta = va_arg(ap, char *);
+  latestbetabuild = va_arg(ap, int);
+  latestbetaurl = va_arg(ap, char *);
+  latestbetainfo = va_arg(ap, char *);
+
   va_end(ap);
 
   printf("Screen name: %s\n", sn);
@@ -578,6 +593,12 @@ int faimtest_parse_authresp(struct aim_session_t *sess, struct command_rx_struct
   printf("Email: %s\n", email);
   printf("BOS IP: %s\n", bosip);
 
+  if (latestbeta)
+    printf("Latest beta version: %s, build %d, at %s (more info at %s)\n", latestbeta, latestbetabuild, latestbetaurl, latestbetainfo);
+
+  if (latestrelease)
+    printf("Latest released version: %s, build %d, at %s (more info at %s)\n", latestrelease, latestbuild, latestreleaseurl, latestreleaseinfo);
+
   printf("Closing auth connection...\n");
   aim_conn_kill(sess, &command->conn);
   if (!(bosconn = aim_newconn(sess, AIM_CONN_TYPE_BOS, bosip))) {
This page took 0.069243 seconds and 5 git commands to generate.