Mercurial > pidgin.yaz
changeset 1247:f50146ce818e
[gaim-migrate @ 1257]
more libfaim stuff
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Wed, 13 Dec 2000 00:51:37 +0000 |
parents | 42ca87108cd1 |
children | 920c86b753d7 |
files | libfaim/CHANGES libfaim/aim_ft.c libfaim/aim_login.c libfaim/faim/aim.h src/oscar.c |
diffstat | 5 files changed, 69 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/libfaim/CHANGES Wed Dec 13 00:21:06 2000 +0000 +++ b/libfaim/CHANGES Wed Dec 13 00:51:37 2000 +0000 @@ -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.
--- a/libfaim/aim_ft.c Wed Dec 13 00:21:06 2000 +0000 +++ b/libfaim/aim_ft.c Wed Dec 13 00:51:37 2000 +0000 @@ -1591,7 +1591,6 @@ * 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;
--- a/libfaim/aim_login.c Wed Dec 13 00:21:06 2000 +0000 +++ b/libfaim/aim_login.c Wed Dec 13 00:51:37 2000 +0000 @@ -298,6 +298,10 @@ 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 @@ 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 @@ 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;
--- a/libfaim/faim/aim.h Wed Dec 13 00:21:06 2000 +0000 +++ b/libfaim/faim/aim.h Wed Dec 13 00:51:37 2000 +0000 @@ -447,6 +447,7 @@ 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);
--- a/src/oscar.c Wed Dec 13 00:21:06 2000 +0000 +++ b/src/oscar.c Wed Dec 13 00:51:37 2000 +0000 @@ -458,6 +458,10 @@ 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; struct gaim_connection *gc = find_gaim_conn_by_aim_sess(sess); @@ -469,6 +473,17 @@ 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); sprintf(debug_buff, "inside auth_resp (Screen name: %s)\n", sn); @@ -505,13 +520,20 @@ } + debug_printf("Reg status: %2d\n", regstatus); if (email) { debug_printf("Email: %s\n", email); } else { debug_printf("Email is NULL\n"); } - sprintf(debug_buff, "Closing auth connection...\n"); - debug_print(debug_buff); + debug_printf("BOSIP: %s\n", bosip); + if (latestbeta) + debug_printf("Latest WinAIM beta version %s, build %d, at %s (%s)\n", + latestbeta, latestbetabuild, latestbetaurl, latestbetainfo); + if (latestrelease) + debug_printf("Latest WinAIM released version %s, build %d, at %s (%s)\n", + latestrelease, latestbuild, latestreleaseurl, latestreleaseinfo); + debug_printf("Closing auth connection...\n"); gdk_input_remove(gc->inpa); aim_conn_kill(sess, &command->conn);