You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(106) |
Oct
(334) |
Nov
(246) |
Dec
(145) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(42) |
Feb
(53) |
Mar
(232) |
Apr
(109) |
May
(137) |
Jun
(63) |
Jul
(26) |
Aug
(263) |
Sep
(193) |
Oct
(507) |
Nov
(440) |
Dec
(241) |
2003 |
Jan
(567) |
Feb
(195) |
Mar
(504) |
Apr
(481) |
May
(524) |
Jun
(522) |
Jul
(594) |
Aug
(502) |
Sep
(643) |
Oct
(508) |
Nov
(430) |
Dec
(377) |
2004 |
Jan
(361) |
Feb
(251) |
Mar
(219) |
Apr
(499) |
May
(461) |
Jun
(419) |
Jul
(314) |
Aug
(519) |
Sep
(416) |
Oct
(247) |
Nov
(305) |
Dec
(382) |
2005 |
Jan
(267) |
Feb
(282) |
Mar
(327) |
Apr
(338) |
May
(189) |
Jun
(400) |
Jul
(462) |
Aug
(530) |
Sep
(316) |
Oct
(523) |
Nov
(481) |
Dec
(650) |
2006 |
Jan
(536) |
Feb
(361) |
Mar
(287) |
Apr
(146) |
May
(101) |
Jun
(169) |
Jul
(221) |
Aug
(498) |
Sep
(300) |
Oct
(236) |
Nov
(209) |
Dec
(205) |
2007 |
Jan
(30) |
Feb
(23) |
Mar
(26) |
Apr
(15) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Eric W. <war...@us...> - 2001-11-29 20:55:42
|
Update of /cvsroot/gaim/gaim In directory usw-pr-cvs1:/tmp/cvs-serv17614 Modified Files: NEWS Log Message: hey man nice shot Index: NEWS =================================================================== RCS file: /cvsroot/gaim/gaim/NEWS,v retrieving revision 1.101 retrieving revision 1.102 diff -u -d -r1.101 -r1.102 --- NEWS 2001/11/29 20:50:42 1.101 +++ NEWS 2001/11/29 20:55:39 1.102 @@ -12,6 +12,10 @@ It's getting cloudy. I think it's going to storm somethin' fierce. That's my southern talk. Do you like it? + Eric: I want to be like you. + + Do the cha cha cha! + 0.48 (11/18/2001): Rob: Hi! It's 4:12am! I'm watching The Simpsons. :). Oh boy, sleep! That's where I'm a viking! :) There's not |
From: Rob F. <rob...@us...> - 2001-11-29 20:50:45
|
Update of /cvsroot/gaim/gaim In directory usw-pr-cvs1:/tmp/cvs-serv16088 Modified Files: ChangeLog NEWS gaim.spec.in Log Message: Sweet potato pie and i shut my mouth Index: ChangeLog =================================================================== RCS file: /cvsroot/gaim/gaim/ChangeLog,v retrieving revision 1.364 retrieving revision 1.365 diff -u -d -r1.364 -r1.365 --- ChangeLog 2001/11/29 10:42:11 1.364 +++ ChangeLog 2001/11/29 20:50:42 1.365 @@ -1,6 +1,6 @@ Gaim: The Pimpin' Penguin IM Clone thats good for the soul! -version 0.49: +version 0.49 (11/29/2001): * Can compile against GTK+ 2.0 (version 1.3.10/1.3.11) * Confirm before removing buddies * Updated Russian translation (thanks Grigory Bakunov) Index: NEWS =================================================================== RCS file: /cvsroot/gaim/gaim/NEWS,v retrieving revision 1.100 retrieving revision 1.101 diff -u -d -r1.100 -r1.101 --- NEWS 2001/11/15 23:21:03 1.100 +++ NEWS 2001/11/29 20:50:42 1.101 @@ -1,6 +1,16 @@ -=[ Gaim ]=- The Pimpin' Penguin AIM Clone That's Good For The Soul! -0.49: +0.49 (11/29/2001): + Rob: *still mamboing* + + Whew! That was a bad little mambo. I hope everyone had a nice + little Holiday, if you celebrate. If not, then I hope you had + a sucky weekend. :-D. + + Oh, lots of cheese for everyone!! (Beware the duffle) + + It's getting cloudy. I think it's going to storm somethin' + fierce. That's my southern talk. Do you like it? 0.48 (11/18/2001): Rob: Hi! It's 4:12am! I'm watching The Simpsons. :). Index: gaim.spec.in =================================================================== RCS file: /cvsroot/gaim/gaim/gaim.spec.in,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- gaim.spec.in 2001/11/15 10:12:20 1.30 +++ gaim.spec.in 2001/11/29 20:50:42 1.31 @@ -99,6 +99,20 @@ rm -r $RPM_BUILD_ROOT %changelog +* Thu Nov 29 2001 Rob Flynn <ro...@ma...> (0.49 release) +- Can compile against GTK+ 2.0 (version 1.3.10/1.3.11) +- Confirm before removing buddies +- Updated Russian translation (thanks Grigory Bakunov) +- Updated Korean translation (thanks Ho-seok Lee, also for resized ICQ icons) +- Updated Dutch translation (thanks Floris Eshuis) +- Yahoo updates (thanks Brian Macke) +- Jabber updates +- Zephyr updates (thanks Arun A Tharuvai) +- Gadu-Gadu updates (thanks Arkadiusz Miskiewicz) +- Option to show aliases in conversation tabs +- Option to hide windows after sending messages +- licq2gaim.pl conversion script (thanks Arturo Cisneros, Jr.) + * Thu Nov 18 2001 Rob Flynn <ro...@ma...> (0.48 release) - Right-click on links to open/copy URL - Yahoo changes |
From: Eric W. <war...@us...> - 2001-11-29 10:42:15
|
Update of /cvsroot/gaim/gaim/src/protocols/jabber In directory usw-pr-cvs1:/tmp/cvs-serv17053/src/protocols/jabber Modified Files: jabber.c Log Message: jabber can do digest authentication now. isn't that spectacular. Index: jabber.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/jabber/jabber.c,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- jabber.c 2001/11/27 09:57:48 1.29 +++ jabber.c 2001/11/29 10:42:12 1.30 @@ -284,6 +284,29 @@ xmlnode_free(x); } +static void gjab_reqauth(gjconn j) +{ + xmlnode x, y, z; + char *user; + + if (!j) + return; + + x = jutil_iqnew(JPACKET__GET, NS_AUTH); + xmlnode_put_attrib(x, "id", IQID_AUTH); + y = xmlnode_get_tag(x, "query"); + + user = j->user->user; + + if (user) { + z = xmlnode_insert_tag(y, "username"); + xmlnode_insert_cdata(z, user, -1); + } + + gjab_send(j, x); + xmlnode_free(x); +} + static void gjab_auth(gjconn j) { xmlnode x, y, z; @@ -307,6 +330,7 @@ xmlnode_insert_cdata(z, j->user->resource, -1); if (j->sid) { + debug_printf("digest authentication (sid %s)\n", j->sid); z = xmlnode_insert_tag(y, "digest"); hash = pmalloc(x->p, strlen(j->sid) + strlen(j->pass) + 1); strcpy(hash, j->sid); @@ -361,7 +385,7 @@ if (strcmp(name, "stream:stream") == 0) { /* special case: name == stream:stream */ /* id attrib of stream is stored for digest auth */ - j->sid = xmlnode_get_attrib(x, "id"); + j->sid = g_strdup(xmlnode_get_attrib(x, "id")); /* STATE_EVT(JCONN_STATE_AUTH) */ xmlnode_free(x); } else { @@ -929,7 +953,8 @@ xmlnode_free(x); } -static void jabber_handlevcard(gjconn j, xmlnode querynode, char *from) { +static void jabber_handlevcard(gjconn j, xmlnode querynode, char *from) +{ struct gaim_connection *gc = GJ_GC(j); char buf[1024]; char *fn, *url, *email, *nickname, *status, *desc; @@ -972,17 +997,27 @@ static void jabber_handleauthresp(gjconn j, jpacket p) { if (jpacket_subtype(p) == JPACKET__RESULT) { - debug_printf("auth success\n"); + if (xmlnode_has_children(p->x)) { + xmlnode query = xmlnode_get_tag(p->x, "query"); + set_login_progress(GJ_GC(j), 4, "Authenticating"); + if (!xmlnode_get_tag(query, "digest")) { + g_free(j->sid); + j->sid = NULL; + } + gjab_auth(j); + } else { + debug_printf("auth success\n"); - account_online(GJ_GC(j)); - serv_finish_login(GJ_GC(j)); + account_online(GJ_GC(j)); + serv_finish_login(GJ_GC(j)); - if (bud_list_cache_exists(GJ_GC(j))) - do_import(GJ_GC(j), NULL); + if (bud_list_cache_exists(GJ_GC(j))) + do_import(GJ_GC(j), NULL); - ((struct jabber_data *)GJ_GC(j)->proto_data)->did_import = TRUE; + ((struct jabber_data *)GJ_GC(j)->proto_data)->did_import = TRUE; - gjab_reqroster(j); + gjab_reqroster(j); + } } else { xmlnode xerr; char *errmsg = NULL; @@ -1088,6 +1123,7 @@ static void jabber_handlepacket(gjconn j, jpacket p) { + char *id; switch (p->type) { case JPACKET_MESSAGE: jabber_handlemessage(j, p); @@ -1098,16 +1134,16 @@ case JPACKET_IQ: debug_printf("jpacket_subtype: %d\n", jpacket_subtype(p)); - if (xmlnode_get_attrib(p->x, "id") && (strcmp(xmlnode_get_attrib(p->x, "id"), IQID_AUTH) == 0)) { + if (((id = xmlnode_get_attrib(p->x, "id")) != NULL) && !strcmp(id, IQID_AUTH)) { jabber_handleauthresp(j, p); - break; /* I'm not sure if you like this style, Eric. */ + break; } if (jpacket_subtype(p) == JPACKET__SET) { } else if (jpacket_subtype(p) == JPACKET__GET) { xmlnode querynode; querynode = xmlnode_get_tag(p->x, "query"); - if(NSCHECK(querynode, NS_VERSION)) { + if (NSCHECK(querynode, NS_VERSION)) { jabber_handleversion(j, p->x); } else if (NSCHECK(querynode, NS_TIME)) { jabber_handletime(j, p->x); @@ -1176,11 +1212,11 @@ signoff(GJ_GC(j)); break; case JCONN_STATE_CONNECTED: - set_login_progress(GJ_GC(j), 3, "Connected"); + set_login_progress(GJ_GC(j), 2, "Connected"); break; case JCONN_STATE_ON: - set_login_progress(GJ_GC(j), 5, "Logging in..."); - gjab_auth(j); + set_login_progress(GJ_GC(j), 3, "Requesting Authentication Method"); + gjab_reqauth(j); break; default: debug_printf("state change: %d\n", state); @@ -1234,6 +1270,7 @@ close(jd->jc->fd); g_timeout_add(50, jabber_free, jd->jc); xmlnode_free(jd->jc->current); + g_free(jd->jc->sid); jd->jc = NULL; g_free(jd); gc->proto_data = NULL; |
From: Eric W. <war...@us...> - 2001-11-29 10:42:14
|
Update of /cvsroot/gaim/gaim In directory usw-pr-cvs1:/tmp/cvs-serv17053 Modified Files: ChangeLog Log Message: jabber can do digest authentication now. isn't that spectacular. Index: ChangeLog =================================================================== RCS file: /cvsroot/gaim/gaim/ChangeLog,v retrieving revision 1.363 retrieving revision 1.364 diff -u -d -r1.363 -r1.364 --- ChangeLog 2001/11/28 20:57:31 1.363 +++ ChangeLog 2001/11/29 10:42:11 1.364 @@ -7,6 +7,8 @@ * Updated Korean translation (thanks Ho-seok Lee, also for resized ICQ icons) * Updated Dutch translation (thanks Floris Eshuis) + * Yahoo updates (thanks Brian Macke) + * Jabber updates * Zephyr updates (thanks Arun A Tharuvai) * Gadu-Gadu updates (thanks Arkadiusz Miskiewicz) * Option to show aliases in conversation tabs |
From: Eric W. <war...@us...> - 2001-11-29 08:39:59
|
Update of /cvsroot/gaim/gaim/src/protocols/yahoo In directory usw-pr-cvs1:/tmp/cvs-serv16049/protocols/yahoo Modified Files: yahoo.c Log Message: helps to nul-terminate strings. Index: yahoo.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/yahoo/yahoo.c,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- yahoo.c 2001/11/27 23:55:50 1.20 +++ yahoo.c 2001/11/29 08:39:55 1.21 @@ -479,12 +479,15 @@ m = msg; for (i = 0, j = 0; m[i]; i++) { if (m[i] == 033) { - while (m[i] != 'm') + while (m[i] && (m[i] != 'm')) i++; + if (!m[i]) + i--; continue; } msg[j++] = m[i]; } + msg[j] = 0; serv_got_im(gc, from, msg, 0, tm); } else if (pkt->status == 2) { do_error_dialog(_("Your message did not get sent."), _("Gaim - Error")); |
From: Eric W. <war...@us...> - 2001-11-29 08:36:35
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv14670 Modified Files: gtkimhtml.c Log Message: i'm so absent-minded today Index: gtkimhtml.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/gtkimhtml.c,v retrieving revision 1.82 retrieving revision 1.83 diff -u -d -r1.82 -r1.83 --- gtkimhtml.c 2001/11/29 03:32:21 1.82 +++ gtkimhtml.c 2001/11/29 08:36:31 1.83 @@ -1920,7 +1920,6 @@ #define ENCDNG 14 for (i = 0; xflds [i]; i++); - g_print("%d\n", i); if (i != 15) { int tmp; newvals = g_malloc0 (16 * sizeof (gchar *)); |
From: Eric W. <war...@us...> - 2001-11-29 03:32:24
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv23921 Modified Files: gtkimhtml.c Log Message: what the hell? this shouldn't happen Index: gtkimhtml.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/gtkimhtml.c,v retrieving revision 1.81 retrieving revision 1.82 diff -u -d -r1.81 -r1.82 --- gtkimhtml.c 2001/11/28 20:57:31 1.81 +++ gtkimhtml.c 2001/11/29 03:32:21 1.82 @@ -1891,7 +1891,7 @@ gchar **xflds; gchar **newvals; - gint i; + gint i, j; gchar **names; gchar fs[10]; @@ -1920,8 +1920,17 @@ #define ENCDNG 14 for (i = 0; xflds [i]; i++); - newvals = g_memdup (xflds, (i + 1) * sizeof (xflds)); - if (!xflds [ADSTYL][0]) + g_print("%d\n", i); + if (i != 15) { + int tmp; + newvals = g_malloc0 (16 * sizeof (gchar *)); + newvals [0] = ""; + for (tmp = 1; tmp < 15; tmp++) + newvals [tmp] = "*"; + } else + newvals = g_memdup (xflds, 16 * sizeof (xflds)); + + if ((i < ADSTYL) && !xflds [ADSTYL][0]) newvals [ADSTYL] = "*"; if (bold) @@ -1936,38 +1945,52 @@ if (name) names = g_strsplit (name, ",", -1); - else { + else if (i > FMLY) { names = g_new0 (gchar *, 2); names [0] = g_strdup (xflds [FMLY]); + } else { + names = g_new0 (gchar *, 2); + names [0] = g_strdup ("*"); } - for (i = 0; names [i]; i++) { - newvals [FMLY] = names [i]; + for (j = 0; names [j]; j++) { + newvals [FMLY] = names [j]; TRY_FONT; } - for (i = 0; italics && names [i]; i++) { - newvals [FMLY] = names [i]; + for (j = 0; italics && names [j]; j++) { + newvals [FMLY] = names [j]; newvals [SLANT] = "o"; TRY_FONT; - newvals [SLANT] = xflds [SLANT]; + if (i > SLANT) + newvals [SLANT] = xflds [SLANT]; + else + newvals [SLANT] = "*"; TRY_FONT; } - for (i = 0; fontsize && names [i]; i++) { - newvals [FMLY] = names [i]; + for (j = 0; fontsize && names [j]; j++) { + newvals [FMLY] = names [j]; - newvals [PXLSZ] = xflds [PXLSZ]; - newvals [PTSZ] = xflds [PTSZ]; + if (i > PTSZ) { + newvals [PXLSZ] = xflds [PXLSZ]; + newvals [PTSZ] = xflds [PTSZ]; + } else { + newvals [PXLSZ] = "*"; + newvals [PTSZ] = "*"; + } TRY_FONT; } - for (i = 0; bold && names [i]; i++) { - newvals [FMLY] = names [i]; + for (j = 0; bold && names [j]; j++) { + newvals [FMLY] = names [j]; - newvals [WGHT] = xflds [WGHT]; + if (i > WGHT) + newvals [WGHT] = xflds [WGHT]; + else + newvals [WGHT] = "*"; TRY_FONT; } |
From: Eric W. <war...@us...> - 2001-11-28 21:06:47
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv17391/src Modified Files: ui.h Log Message: gtk2 (1.3.11) Index: ui.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/ui.h,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- ui.h 2001/11/21 12:15:37 1.21 +++ ui.h 2001/11/28 21:06:45 1.22 @@ -42,6 +42,8 @@ gtk_window_set_type_hint(GTK_WINDOW(x), GDK_WINDOW_TYPE_HINT_DIALOG) #define GdkWindowPrivate GdkWindowObject #define gtk_toolbar_new(x,y) gtk_toolbar_new() +#define gtk_accel_group_attach(x, y) _gtk_accel_group_attach(x, y) +#define gtk_widget_lock_accelerators(x) #else #define GAIM_DIALOG(x) x = gtk_window_new(GTK_WINDOW_DIALOG) #define GTK_OLD_EDITABLE(x) GTK_EDITABLE(x) |
From: Eric W. <war...@us...> - 2001-11-28 20:57:34
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv14806/src Modified Files: gtkimhtml.c Log Message: gtk2 (1.3.11) Index: gtkimhtml.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/gtkimhtml.c,v retrieving revision 1.80 retrieving revision 1.81 diff -u -d -r1.80 -r1.81 --- gtkimhtml.c 2001/11/20 07:05:36 1.80 +++ gtkimhtml.c 2001/11/28 20:57:31 1.81 @@ -841,9 +841,10 @@ imhtml->llheight = 0; imhtml->llascent = 0; - if (GTK_LAYOUT (imhtml)->yoffset < TOP_BORDER) + if (GTK_LAYOUT (imhtml)->vadjustment->value < TOP_BORDER) gdk_window_clear_area (GTK_LAYOUT (imhtml)->bin_window, 0, 0, - imhtml->xsize, TOP_BORDER - GTK_LAYOUT (imhtml)->yoffset); + imhtml->xsize, + TOP_BORDER - GTK_LAYOUT (imhtml)->vadjustment->value); b = imhtml->bits; while (b) { @@ -1721,18 +1722,15 @@ { GtkLayout *layout = GTK_LAYOUT (imhtml); - layout->xoffset = (gint) layout->hadjustment->value; - layout->yoffset = (gint) layout->vadjustment->value; - if (!GTK_WIDGET_MAPPED (imhtml) || !GTK_WIDGET_REALIZED (imhtml)) return; if (layout->freeze_count) return; - if (layout->yoffset < TOP_BORDER) + if (layout->vadjustment->value < TOP_BORDER) gdk_window_clear_area (layout->bin_window, 0, 0, - imhtml->xsize, TOP_BORDER - layout->yoffset); + imhtml->xsize, TOP_BORDER - layout->vadjustment->value); gtk_imhtml_draw_exposed (imhtml); } |
From: Eric W. <war...@us...> - 2001-11-28 20:57:34
|
Update of /cvsroot/gaim/gaim In directory usw-pr-cvs1:/tmp/cvs-serv14806 Modified Files: ChangeLog Log Message: gtk2 (1.3.11) Index: ChangeLog =================================================================== RCS file: /cvsroot/gaim/gaim/ChangeLog,v retrieving revision 1.362 retrieving revision 1.363 diff -u -d -r1.362 -r1.363 --- ChangeLog 2001/11/27 21:26:51 1.362 +++ ChangeLog 2001/11/28 20:57:31 1.363 @@ -1,7 +1,7 @@ Gaim: The Pimpin' Penguin IM Clone thats good for the soul! version 0.49: - * Can compile against GTK+ 2.0 (version 1.3.10) + * Can compile against GTK+ 2.0 (version 1.3.10/1.3.11) * Confirm before removing buddies * Updated Russian translation (thanks Grigory Bakunov) * Updated Korean translation (thanks Ho-seok Lee, also for |
From: Eric W. <war...@us...> - 2001-11-28 05:30:16
|
Update of /cvsroot/gaim/gaim/src/protocols/oscar In directory usw-pr-cvs1:/tmp/cvs-serv28278/src/protocols/oscar Modified Files: im.c rxqueue.c Log Message: plug it in, plug it in Index: im.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/im.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- im.c 2001/11/19 02:53:46 1.17 +++ im.c 2001/11/28 05:30:13 1.18 @@ -953,30 +953,6 @@ return 0; } -/* - * - * This should use tlvlists, but doesn't for performance reasons. - * - * XXX support multipart IMs: - * - * 0004 0007 0000 8f08 d295 - * 0031 6520 3b7b f9fd - * 0001 - * 06 XXXX XXXX XXXX - * 0000 - * 0004 - * 0001 0002 0004 - * 0010 0004 0000 01a3 - * 0002 0004 3ab6 94fa - * 0003 0004 3b7b f85a - * 0002 003c - * 0501 0001 01 - * 0101 000a 0000 0000 3c48 544d 4c3e ASCII part - * ISO-8859 part: - * 0101 0016 0003 0000 6c6b 7364 6a6b 6c6a 676c a56b 3b73 646a 6b6a - * 0101 000b 0000 0000 3c2f 4854 4d4c 3e another ASCII part - * - */ static int incomingim_ch1(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, fu16_t channel, aim_userinfo_t *userinfo, aim_bstream_t *bs, fu8_t *cookie) { fu16_t type, length; Index: rxqueue.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/rxqueue.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- rxqueue.c 2001/11/10 08:02:39 1.4 +++ rxqueue.c 2001/11/28 05:30:13 1.5 @@ -24,10 +24,10 @@ int ret; ret = recv(fd, ((unsigned char *)buf)+cur, left, 0); - if (ret == -1) + + /* Of course EOF is an error, only morons disagree with that. */ + if (ret <= 0) return -1; - else if (ret == 0) - return cur; cur += ret; left -= ret; @@ -396,7 +396,11 @@ * or we break. We must handle it just in case. */ if (aimbs_get8(&flaphdr) != 0x2a) { - faimdprintf(sess, 0, "FLAP framing disrupted"); + fu8_t start; + + aim_bstream_rewind(&flaphdr); + start = aimbs_get8(&flaphdr); + faimdprintf(sess, 0, "FLAP framing disrupted (0x%02x)", start); aim_conn_close(conn); return -1; } |
From: Eric W. <war...@us...> - 2001-11-27 23:55:54
|
Update of /cvsroot/gaim/gaim/src/protocols/yahoo In directory usw-pr-cvs1:/tmp/cvs-serv22151/protocols/yahoo Modified Files: yahoo.c Log Message: whoops :) Index: yahoo.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/yahoo/yahoo.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- yahoo.c 2001/11/27 22:46:03 1.19 +++ yahoo.c 2001/11/27 23:55:50 1.20 @@ -386,6 +386,7 @@ if (pkt->service == YAHOO_SERVICE_LOGOFF || strtol(pair->value, NULL, 10) == 0) { serv_got_update(gc, name, 0, 0, 0, 0, 0, 0); + break; } if (state == YAHOO_STATUS_AVAILABLE) serv_got_update(gc, name, 1, 0, 0, 0, 0, 0); |
From: Eric W. <war...@us...> - 2001-11-27 22:54:35
|
Update of /cvsroot/gaim/gaim/src/protocols/gg In directory usw-pr-cvs1:/tmp/cvs-serv5003/src/protocols/gg Modified Files: gg.c protocol.txt Log Message: thanks Arkadiusz Miskiewicz: Here is patch that adds ,,delete userlist from server'', updates protocol.txt and makes small cleanup with freeing webdata + with function names (all agg_ names are reserved for struct prpl functions ;) Index: gg.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/gg/gg.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- gg.c 2001/11/26 21:22:56 1.12 +++ gg.c 2001/11/27 22:54:32 1.13 @@ -79,6 +79,7 @@ #define AGG_HTTP_SEARCH 1 #define AGG_HTTP_USERLIST_IMPORT 2 #define AGG_HTTP_USERLIST_EXPORT 3 +#define AGG_HTTP_USERLIST_DELETE 4 #define UC_NORMAL 2 @@ -578,7 +579,6 @@ gd->sess->state = GG_STATE_CONNECTING_HTTP; gd->sess->check = GG_CHECK_WRITE; gd->sess->async = 1; - gd->sess->recv_left = 0; gd->sess->fd = proxy_connect(GG_APPMSG_HOST, GG_APPMSG_PORT, login_callback, gc); if (gd->sess->fd < 0) { @@ -667,7 +667,6 @@ if ((ptr = strstr(webdata, "query_results:")) == NULL || (ptr = strchr(ptr, '\n')) == NULL) { debug_printf("search_callback: pubdir result [%s]\n", webdata); - g_free(webdata); do_error_dialog(_("Couldn't get search results"), _("Gadu-Gadu Error")); return; } @@ -677,8 +676,6 @@ webdata_tbl = g_strsplit(ptr, "\n", AGG_PUBDIR_MAX_ENTRIES); - g_free(webdata); - j = 0; /* Parse array */ @@ -768,28 +765,25 @@ g_free(buf); } -static void agg_import_buddies_results(struct gaim_connection *gc, gchar *webdata) +static void import_buddies_server_results(struct gaim_connection *gc, gchar *webdata) { gchar *ptr; gchar **users_tbl; int i; if (strstr(webdata, "no_data:")) { - g_free(webdata); do_error_dialog(_("There is no Buddy List stored on server. Sorry!"), _("Gadu-Gadu Error")); return; } if ((ptr = strstr(webdata, "get_results:")) == NULL || (ptr = strchr(ptr, ':')) == NULL) { - debug_printf("agg_import_buddies_list: import buddies result [%s]\n", webdata); - g_free(webdata); + debug_printf("import_buddies_server_results: import buddies result [%s]\n", webdata); do_error_dialog(_("Couldn't Import Buddies List from Server"), _("Gadu-Gadu Error")); return; } ptr++; users_tbl = g_strsplit(ptr, "\n", AGG_PUBDIR_MAX_ENTRIES); - g_free(webdata); /* Parse array of Buddies List */ for (i = 0; users_tbl[i] != NULL; i++) { @@ -806,7 +800,7 @@ continue; } - debug_printf("uin: %s\n", name); + debug_printf("import_buddies_server_results: uin: %s\n", name); if (!find_buddy(gc, name)) { /* Default group if none specified on server */ gchar *group = g_strdup("Gadu-Gadu"); @@ -828,20 +822,30 @@ g_strfreev(users_tbl); } -static void agg_export_buddies_results(struct gaim_connection *gc, gchar *webdata) +static void export_buddies_server_results(struct gaim_connection *gc, gchar *webdata) { if (strstr(webdata, "put_success:")) { - g_free(webdata); do_error_dialog(_("Buddies List sucessfully transfered into Server"), _("Gadu-Gadu Information")); return; } - debug_printf("agg_export_buddies_results: webdata [%s]\n", webdata); - g_free(webdata); + debug_printf("export_buddies_server_results: webdata [%s]\n", webdata); do_error_dialog(_("Couldn't transfer Buddies List into Server"), _("Gadu-Gadu Error")); } +static void delete_buddies_server_results(struct gaim_connection *gc, gchar *webdata) +{ + if (strstr(webdata, "put_success:")) { + do_error_dialog(_("Buddies List sucessfully deleted from Server"), + _("Gadu-Gadu Information")); + return; + } + + debug_printf("delete_buddies_server_results: webdata [%s]\n", webdata); + do_error_dialog(_("Couldn't delete Buddies List from Server"), _("Gadu-Gadu Error")); +} + static void http_results(gpointer data, gint source, GaimInputCondition cond) { struct agg_http *hdata = data; @@ -890,17 +894,21 @@ search_results(gc, webdata); break; case AGG_HTTP_USERLIST_IMPORT: - agg_import_buddies_results(gc, webdata); + import_buddies_server_results(gc, webdata); break; case AGG_HTTP_USERLIST_EXPORT: - agg_export_buddies_results(gc, webdata); + export_buddies_server_results(gc, webdata); break; + case AGG_HTTP_USERLIST_DELETE: + delete_buddies_server_results(gc, webdata); + break; case AGG_HTTP_NONE: default: debug_printf("http_results: unsupported type %d\n", hdata->type); break; } + g_free(webdata); g_free(hdata); } @@ -956,7 +964,7 @@ hdata->inpa = gaim_input_add(source, GAIM_INPUT_READ, http_results, hdata); } -static void agg_import_buddies(struct gaim_connection *gc) +static void import_buddies_server(struct gaim_connection *gc) { struct agg_http *hi = g_new0(struct agg_http, 1); static char msg[AGG_BUF_LEN]; @@ -977,7 +985,7 @@ } } -static void agg_export_buddies(struct gaim_connection *gc) +static void export_buddies_server(struct gaim_connection *gc) { struct agg_http *he = g_new0(struct agg_http, 1); static char msg[AGG_BUF_LEN]; @@ -1023,6 +1031,27 @@ } } +static void delete_buddies_server(struct gaim_connection *gc) +{ + struct agg_http *he = g_new0(struct agg_http, 1); + static char msg[AGG_BUF_LEN]; + + he->gc = gc; + he->type = AGG_HTTP_USERLIST_DELETE; + he->form = AGG_PUBDIR_USERLIST_EXPORT_FORM; + he->host = GG_PUBDIR_HOST; + he->request = g_strdup_printf("FmNum=%s&Pass=%s&Delete=1", gc->username, gc->password); + + if (proxy_connect(GG_PUBDIR_HOST, GG_PUBDIR_PORT, http_req_callback, he) < 0) { + g_snprintf(msg, sizeof(msg), _("Deletion of Buddies List from Server failed (%s)"), + GG_PUBDIR_HOST); + do_error_dialog(msg, _("Gadu-Gadu Error")); + g_free(he->request); + g_free(he); + return; + } +} + static void agg_dir_search(struct gaim_connection *gc, char *first, char *middle, char *last, char *maiden, char *city, char *state, char *country, char *email) { @@ -1066,9 +1095,11 @@ if (!strcmp(action, _("Directory Search"))) { show_find_info(gc); } else if (!strcmp(action, _("Import Buddies List from Server"))) { - agg_import_buddies(gc); + import_buddies_server(gc); } else if (!strcmp(action, _("Export Buddies List to Server"))) { - agg_export_buddies(gc); + export_buddies_server(gc); + } else if (!strcmp(action, _("Delete Buddies List from Server"))) { + delete_buddies_server(gc); } } @@ -1079,6 +1110,7 @@ m = g_list_append(m, _("Directory Search")); m = g_list_append(m, _("Import Buddies List from Server")); m = g_list_append(m, _("Export Buddies List to Server")); + m = g_list_append(m, _("Delete Buddies List from Server")); return m; } Index: protocol.txt =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/gg/protocol.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- protocol.txt 2001/09/29 23:06:30 1.1 +++ protocol.txt 2001/11/27 22:54:32 1.2 @@ -1,12 +1,20 @@ --------------------------------------------------------------------------- - protokó³ g*du-g*du 4.x - (c) copyright 2001 by wojtek kaniewski <woj...@ir...> + Protokó³ G*du-G*du 4.x + + (C) Copyright 2001 by Wojtek Kaniewski <woj...@ir...>, + Robert J. Wo¼ny <sp...@at...>, + Tomasz Jarzynka <to...@cp...>, + Adam Ludwikowski <ada...@wp...>, + Marek Kozina <kl...@hy...>, + Rafa³ Florek <ra...@re...>, + Igor Popik <ig...@ws...> --- 0) disclaimer --------------------------------------------------------- -wszystkie informacje bazuj± na do¶wiadczeniach przeprowadzonych na moim -domowym komputerze. ¿aden klient g*du-g*du nie zosta³ skrzywdzony podczas +opis protoko³u bazuj± na do¶wiadczeniach przeprowadzonych na moim +domowym komputerze oraz informacjach przys³anych do mnie przez ró¿nych +ludzi. ¿aden klient g*du-g*du nie zosta³ skrzywdzony podczas przeprowadzania badañ, blabla. --- 1) transmisja, format wszystkich pakietów ----------------------------- @@ -37,8 +45,20 @@ User-Agent: Mozilla/4.7 [en] (Win98; I) Pragma: no-cache -na co powinni¶my dostaæ odpowied¼ w stylu: +oryginalny klient mo¿e wys³aæ jeden z podanych identyfikatorów przegl±darki: + Mozilla/4.04 [en] (Win95; I ;Nav) + Mozilla/4.7 [en] (Win98; I) + Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt) + Mozilla/4.0 (compatible; MSIE 5.0; Windows NT) + Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt) + Mozilla/4.0 (compatible; MSIE 5.0; Windows 98) + +nowsze wersje klienta do zapytania dodaj± równie¿ `version=...' opisuj±ce, +z jakim klientem serwer ma do czynienia. jednak ze wzglêdu na mo¿liwe +ró¿nice w protokole, lepiej pomijaæ ten parametr i uwagaæ GG 4.0. w ka¿dym +razie na to zapytanie serwer powinien odpowiedzieæ: + HTTP/1.0 200 OK 0 1 0 217.17.33.21:8074 217.17.33.21 217.17.33.21 @@ -47,10 +67,12 @@ przemy¶lany i w przysz³o¶ci bêdzie mo¿na u¿ywaæ ró¿nych serwerów do ró¿nych rzeczy, typu szukanie, obs³uga klientów itd. póki co, ³±czyæ siê trzeba na pierwszy adres (tak, ten z portem). +Je¿eli po³±czenie z portem 8074 nie wyjdzie z jaki¶ specyficznych powodów - +mo¿na siê ³±czyæ na port 443. --- 3) logowanie siê ------------------------------------------------------- -po po³±czeniu siê portem 8074 serwera g*du-g*du, dostajemy pakiet typu 0x0001, +po po³±czeniu siê portem serwera g*du-g*du, dostajemy pakiet typu 0x0001, który na potrzeby tego dokumentu nazwiemy: #define GG_WELCOME 0x0001 @@ -72,7 +94,7 @@ int uin; /* twój numerek */ int hash; /* hash has³a */ int status; /* status na dzieñ dobry */ - int dunno1; /* == 0x0b */ + int version; /* wersja klienta */ int local_ip; /* mój adres ip */ short local_port; /* port, na którym s³ucham */ }; @@ -84,9 +106,20 @@ for (hash = 1; *passwd; passwd++) hash *= (*passwd) + 1; -zrozumia³e, racja? je¶li wszystko siê powiedzie, dostaniemy w odpowiedzi -pakiet typu +zrozumia³e, racja? liczba oznaczaj±ca wersjê mo¿e byæ jedn± z poni¿szych: + 0x11 - 4.6.1 + 0x10 - 4.5.22, 4.5.21, 4.5.19, 4.5.17, 4.5.15 + 0x0f - 4.5.12 + 0x0b - 4.0.30, 4.0.29, 4.0.28, 4.0.25 + +oczywi¶cie nie s± to wszystkie mo¿liwe wersje klientów, lecz te, które +uda³o siê sprawdziæ. najbezpieczniej bêdzie przedstawiaæ siê jako ta +wersja, której ficzerów u¿ywamy. wiadomo, ¿e 4.0.x nie obs³ugiwa³y trybu +ukrytego, ani tylko dla znajomych itd. + +je¶li wszystko siê powiedzie, dostaniemy w odpowiedzi pakiet typu + #define GG_LOGIN_OK 0x0003 z polem header->length = 0, lub pakiet @@ -137,14 +170,16 @@ int status; /* status danej osoby */ int remote_ip; /* adres ip delikwenta */ short remote_port; /* port, na którym s³ucha klient */ - int dunno1; /* == 0x0b */ - short dunno2; /* znowu port? */ + int version; /* wersja klienta */ + short dunno1; /* znowu port? */ }; je¶li klient nie obs³uguje po³±czeñ miêdzy klientami (np. g*du-g*du 3.x) -zamiast adresu ip jest 0, zamiast portu jest 2. niewa¿ne ;) w ka¿dym razie, -je¶li kto¶ siê pojawi w trakcie pracy, równie¿ zostanie przys³any ten -pakiet. proste? proste :) +zamiast adresu ip jest 0, zamiast portu mo¿e byæ 0, 1, 2... niewa¿ne ;) +port mo¿e przyjmowaæ warto¶æ 1, je¶li klient znajduje siê za jakim¶ +firewallem lub innym urz±dzeniem robi±cym NAT. w ka¿dym razie, je¶li kto¶ +siê pojawi w trakcie pracy, równie¿ zostanie przys³any ten pakiet. +proste? proste :) ¿eby dodaæ kogo¶ do listy w trakcie pracy, trzeba wys³aæ ni¿ej opisany pakiet. jego format jest identyczny jak przy GG_NOTIFY. @@ -171,8 +206,10 @@ #define GG_SEND_MSG 0x000b + #define GG_CLASS_QUEUED 0x0001 /* tylko przy odbieraniu */ #define GG_CLASS_MSG 0x0004 #define GG_CLASS_CHAT 0x0008 + #define GG_CLASS_UNKNOWN_1 0x0020 struct gg_send_msg { int recipient; @@ -186,9 +223,28 @@ rozmowy za pomoc± czê¶ci bajtów, ale raczej nie ma znaczenia. klasa wiadomo¶ci pozwala odró¿niæ, czy wiadomo¶æ ma siê pokazaæ w osobym okienku czy jako kolejna linijka w okienku rozmowy. wygl±da na to, -¿e to jaka¶ bitmapa, wiêc najlepiej olaæ inne bity ni¿ 0x0f. (czasem -klienty wysy³aj± 0x04, czasem 0x24) +¿e to jaka¶ bitmapa, wiêc najlepiej olaæ inne bity ni¿ 0x0e. (czasem +klienty wysy³aj± 0x04, czasem 0x24 -- widocznie 0x20 to te¿ jaka¶ +flaga). je¶li odbiorca by³ niedostêpny podczas wysy³ania wiadomo¶ci, +zostanie zaznaczony bit 0x01. + +oryginalny klient wysy³aj±c wiadomo¶æ do kilku u¿ytkowników, wysy³a po +prostu kilka takich samych pakietów z ró¿nymi numerkami odbiorców. nie +ma osobnego pakietu do tego. natomiast je¶li chodzi o ,,konferencyjnê'' +do pakietu doklejana jest za ,,char message[];'' nastêpuj±ca struktura: + struct gg_send_recipients { + char flag; /* == 1 */ + int count; /* ilo¶æ odbiorców */ + int recipients[]; /* tablica odbiorców */ + }; + +na przyk³ad, by wys³aæ do trzech ludzi, nale¿y wys³aæ pakiet: + + - -- --- --+--+--+--+--+--+--+-----------+-----------+ + tre¶æ |\0|\1| 0x02 | uin1 | uin2 | + - -- -- ---+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + serwer po otrzymaniu wiadomo¶ci odsy³a informacjê o tym. przy okazji mówi, czy wiadomo¶æ dotar³a do odbiorcy (status == GG_ACK_DELIVERED), czy mo¿e jest offline i zosta³a zakolejkowana (GG_ACK_QUEUED): @@ -208,26 +264,29 @@ --- 7) otrzymywanie wiadomo¶ci --------------------------------------------- -zbyt wiele wyja¶nieñ chyba nie trzeba. wiadomo od kogo. nieznane pola to -co¶ a'la numer sekwencyjny albo identyfikator okienka z rozmow± albo nowe -dane dla setiathome. klasa wiadomo¶ci taka sama jak przy wysy³aniu: +zbyt wiele wyja¶nieñ chyba nie trzeba. wiadomo od kogo. drugie pole to +najprawdopodobniej jaki¶ numerek sekwencyjny. trzecie oznacza czas nadania +wiadomo¶ci. klasa wiadomo¶ci taka sama jak przy wysy³aniu: #define GG_RECV_MSG 0x000a struct gg_recv_msg { int sender; - int dunno1; - int dunno2; + int seq; + int time; int class; char message[]; }; ---- 8) otrzymywanie wiadomo¶ci --------------------------------------------- +w przypadku pakietów ,,konferencyjnych'' na koncu pakietu doklejona jest +struktura identyczna ze struct gg_send_recipients zawieraj±ca pozosta³ych +rozmówców. + +--- 8) ping/pong ----------------------------------------------------------- od czasu do czasu klient wysy³a pakiet a'la ping do serwera i dostaje pust± -odpowied¼. ciê¿ko stwierdziæ, czy serwer wywala, je¶li nie dostanie pinga -przez jaki¶ czas, czy klient siê roz³±cza, je¶li serwer mu nie odpowie. -jako¶ nie chce mi siê sprawdzaæ ;) +odpowied¼. o ile dobrze pamiêtam, serwer roz³±cza siê po up³ywie 5 minut od +otrzymania ostatniej informacji. #define GG_PING 0x0008 @@ -239,8 +298,19 @@ --- 9) podziêkowania ------------------------------------------------------- -swój wk³ad w poznanie protoko³u mia³ Robert Wo¼ny, który opisa³ nowo¶ci -w GG 4.6. +swój wk³ad w poznanie protoko³u mieli: + - Robert J. Wo¼ny <sp...@at...>: + opis nowo¶ci w protokole GG 4.6, + - Tomasz Jarzynka <to...@cp...>: + badanie timeoutów, + - Adam Ludwikowski <ada...@wp...>: + wiele ró¿nych poprawek do tekstu, badanie wersji, + - Marek Kozina <kl...@hy...>: + czas otrzymania wiadomo¶ci, + - Rafa³ Florek <ra...@re...>: + konferencje, + - Igor Popik <ig...@ws...>: + klasy wiadomo¶ci przy odbieraniu zakolejkowanej. ---------------------------------------------------------------------------- |
From: Eric W. <war...@us...> - 2001-11-27 22:46:06
|
Update of /cvsroot/gaim/gaim/src/protocols/yahoo In directory usw-pr-cvs1:/tmp/cvs-serv2958/protocols/yahoo Modified Files: yahoo.c Log Message: this might lose some information in some cases but it should work better in most. Index: yahoo.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/yahoo/yahoo.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- yahoo.c 2001/11/26 23:18:36 1.18 +++ yahoo.c 2001/11/27 22:46:03 1.19 @@ -119,7 +119,6 @@ guchar *rxqueue; int rxlen; GHashTable *hash; - GSList *login; int current_status; gboolean logged_in; }; @@ -136,12 +135,6 @@ GSList *hash; }; -struct yahoo_buddy { - char *name; - int state; - char *msg; -}; - static char *yahoo_name() { return "Yahoo"; } @@ -345,11 +338,10 @@ g_free(pkt); } -static void yahoo_process_logon(struct gaim_connection *gc, struct yahoo_packet *pkt) +static void yahoo_process_status(struct gaim_connection *gc, struct yahoo_packet *pkt) { struct yahoo_data *yd = gc->proto_data; GSList *l = pkt->hash; - struct yahoo_buddy *buddy = NULL; struct yahoo_packet *newpkt; char *name = NULL; int state = 0; @@ -362,17 +354,18 @@ case 0: /* we won't actually do anything with this */ break; case 1: /* we don't get the full buddy list here. */ - account_online(gc); - serv_finish_login(gc); - g_snprintf(gc->displayname, sizeof(gc->displayname), "%s", pair->value); - do_import(gc, NULL); - yd->logged_in = TRUE; - - /* this requests the list. i have a feeling that this is very evil */ - newpkt = yahoo_packet_new(YAHOO_SERVICE_LIST, YAHOO_STATUS_OFFLINE, 0); - yahoo_send_packet(yd, newpkt); - yahoo_packet_free(newpkt); + if (!yd->logged_in) { + account_online(gc); + serv_finish_login(gc); + g_snprintf(gc->displayname, sizeof(gc->displayname), "%s", pair->value); + do_import(gc, NULL); + yd->logged_in = TRUE; + /* this requests the list. i have a feeling that this is very evil */ + newpkt = yahoo_packet_new(YAHOO_SERVICE_LIST, YAHOO_STATUS_OFFLINE, 0); + yahoo_send_packet(yd, newpkt); + yahoo_packet_free(newpkt); + } break; case 8: /* how many online buddies we have */ break; @@ -389,45 +382,28 @@ break; case 17: /* in chat? */ break; - case 13: /* in pager, i think this should always be 1 */ - /* we don't actually give notification here. we wait until after we've - * gotten the list, so that they get added to the right group */ - buddy = g_new0(struct yahoo_buddy, 1); - buddy->name = g_strdup(name); - buddy->state = state; - buddy->msg = msg ? g_strdup(msg) : NULL; - yd->login = g_slist_append(yd->login, buddy); - break; - case 60: /* uh */ - while (yd->login) { - buddy = yd->login->data; - state = buddy->state; - yd->login = g_slist_remove(yd->login, buddy); - if (state == YAHOO_STATUS_AVAILABLE) - serv_got_update(gc, buddy->name, 1, 0, 0, 0, 0, 0); - else if (state == YAHOO_STATUS_IDLE) - serv_got_update(gc, buddy->name, 1, 0, 0, time(NULL) - 600, - (state << 1), 0); - else - serv_got_update(gc, buddy->name, 1, 0, 0, 0, - (state << 1) | UC_UNAVAILABLE, 0); - if (state == YAHOO_STATUS_CUSTOM) { - gpointer val = g_hash_table_lookup(yd->hash, buddy->name); - if (val) { - g_free(val); - g_hash_table_insert(yd->hash, buddy->name, - g_strdup(buddy->msg)); - } else - g_hash_table_insert(yd->hash, g_strdup(buddy->name), - g_strdup(buddy->msg)); - } - g_free(buddy->msg); - g_free(buddy->name); - g_free(buddy); + case 13: /* in pager? */ + if (pkt->service == YAHOO_SERVICE_LOGOFF || + strtol(pair->value, NULL, 10) == 0) { + serv_got_update(gc, name, 0, 0, 0, 0, 0, 0); } + if (state == YAHOO_STATUS_AVAILABLE) + serv_got_update(gc, name, 1, 0, 0, 0, 0, 0); + else + serv_got_update(gc, name, 1, 0, 0, 0, (state << 1) | UC_UNAVAILABLE, 0); + if (state == YAHOO_STATUS_CUSTOM) { + gpointer val = g_hash_table_lookup(yd->hash, name); + if (val) { + g_free(val); + g_hash_table_insert(yd->hash, name, g_strdup(msg)); + } else + g_hash_table_insert(yd->hash, g_strdup(name), g_strdup(msg)); + } break; + case 60: /* no clue */ + break; default: - debug_printf("unknown login key %d\n", pair->key); + debug_printf("unknown status key %d\n", pair->key); break; } @@ -437,7 +413,6 @@ static void yahoo_process_list(struct gaim_connection *gc, struct yahoo_packet *pkt) { - struct yahoo_data *yd = gc->proto_data; GSList *l = pkt->hash; gboolean export = FALSE; @@ -476,29 +451,6 @@ if (export) do_export(gc); - - while (yd->login) { - struct yahoo_buddy *buddy = yd->login->data; - int status = buddy->state; - yd->login = g_slist_remove(yd->login, buddy); - if (status == YAHOO_STATUS_AVAILABLE) - serv_got_update(gc, buddy->name, 1, 0, 0, 0, 0, 0); - else if (status == YAHOO_STATUS_IDLE) - serv_got_update(gc, buddy->name, 1, 0, 0, time(NULL) - 600, (status << 1), 0); - else - serv_got_update(gc, buddy->name, 1, 0, 0, 0, (status << 1) | UC_UNAVAILABLE, 0); - if (status == YAHOO_STATUS_CUSTOM) { - gpointer val = g_hash_table_lookup(yd->hash, buddy->name); - if (val) { - g_free(val); - g_hash_table_insert(yd->hash, buddy->name, g_strdup(buddy->msg)); - } else - g_hash_table_insert(yd->hash, g_strdup(buddy->name), g_strdup(buddy->msg)); - } - g_free(buddy->msg); - g_free(buddy->name); - g_free(buddy); - } } static void yahoo_process_message(struct gaim_connection *gc, struct yahoo_packet *pkt) @@ -538,56 +490,6 @@ } } -static void yahoo_process_status(struct gaim_connection *gc, struct yahoo_packet *pkt) -{ - struct yahoo_data *yd = gc->proto_data; - GSList *l = pkt->hash; - char *name = NULL; - int state = 0; - char *msg = NULL; - - while (l) { - struct yahoo_pair *pair = l->data; - - switch (pair->key) { - case 7: - name = pair->value; - break; - case 10: - state = strtol(pair->value, NULL, 10); - break; - case 19: - msg = pair->value; - break; - case 11: /* i didn't know what this was in the old protocol either */ - break; - case 17: /* in chat? */ - break; - case 13: - if (strtol(pair->value, NULL, 10) != 1) { - serv_got_update(gc, name, 0, 0, 0, 0, 0, 0); - break; - } - if (state == YAHOO_STATUS_AVAILABLE) - serv_got_update(gc, name, 1, 0, 0, 0, 0, 0); - else if (state == YAHOO_STATUS_IDLE) - serv_got_update(gc, name, 1, 0, 0, time(NULL) - 600, (state << 1), 0); - else - serv_got_update(gc, name, 1, 0, 0, 0, (state << 1) | UC_UNAVAILABLE, 0); - if (state == YAHOO_STATUS_CUSTOM) { - gpointer val = g_hash_table_lookup(yd->hash, name); - if (val) { - g_free(val); - g_hash_table_insert(yd->hash, name, g_strdup(msg)); - } else - g_hash_table_insert(yd->hash, g_strdup(name), g_strdup(msg)); - } - break; - } - - l = l->next; - } -} static void yahoo_process_contact(struct gaim_connection *gc, struct yahoo_packet *pkt) { @@ -667,8 +569,6 @@ switch (pkt->service) { case YAHOO_SERVICE_LOGON: - yahoo_process_logon(gc, pkt); - break; case YAHOO_SERVICE_LOGOFF: case YAHOO_SERVICE_ISAWAY: case YAHOO_SERVICE_ISBACK: @@ -827,13 +727,6 @@ if (yd->rxqueue) g_free(yd->rxqueue); yd->rxlen = 0; - while (yd->login) { - struct yahoo_buddy *buddy = yd->login->data; - yd->login = g_slist_remove(yd->login, buddy); - g_free(buddy->msg); - g_free(buddy->name); - g_free(buddy); - } if (gc->inpa) gaim_input_remove(gc->inpa); g_free(yd); |
From: Eric W. <war...@us...> - 2001-11-27 21:26:54
|
Update of /cvsroot/gaim/gaim In directory usw-pr-cvs1:/tmp/cvs-serv13254 Modified Files: ChangeLog Log Message: Arun A Tharuvai's Zephyr patch Index: ChangeLog =================================================================== RCS file: /cvsroot/gaim/gaim/ChangeLog,v retrieving revision 1.361 retrieving revision 1.362 diff -u -d -r1.361 -r1.362 --- ChangeLog 2001/11/27 20:54:17 1.361 +++ ChangeLog 2001/11/27 21:26:51 1.362 @@ -7,6 +7,8 @@ * Updated Korean translation (thanks Ho-seok Lee, also for resized ICQ icons) * Updated Dutch translation (thanks Floris Eshuis) + * Zephyr updates (thanks Arun A Tharuvai) + * Gadu-Gadu updates (thanks Arkadiusz Miskiewicz) * Option to show aliases in conversation tabs * Option to hide windows after sending messages * licq2gaim.pl conversion script (thanks Arturo Cisneros, Jr.) |
From: Eric W. <war...@us...> - 2001-11-27 21:26:26
|
Update of /cvsroot/gaim/gaim/src/protocols/zephyr In directory usw-pr-cvs1:/tmp/cvs-serv13054/protocols/zephyr Modified Files: zephyr.c Log Message: Arun A Tharuvai's Zephyr patch Index: zephyr.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/zephyr/zephyr.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- zephyr.c 2001/11/26 20:39:54 1.17 +++ zephyr.c 2001/11/27 21:26:23 1.18 @@ -358,6 +358,7 @@ } } else { char *buf, *buf2; + char *send_inst; char *ptr = notice.z_message + strlen(notice.z_message) + 1; int len = notice.z_message_len - (ptr - notice.z_message); int away; @@ -386,8 +387,11 @@ zt2->open = TRUE; serv_got_joined_chat(zgc, zt2->id, zt2->name); } - serv_got_chat_in(zgc, zt2->id, notice.z_sender, FALSE, - buf2, time((time_t)NULL)); + send_inst = g_strdup_printf("%s %s", notice.z_sender, + notice.z_class_inst); + serv_got_chat_in(zgc, zt2->id, send_inst, FALSE, + buf2, time(NULL)); + g_free(send_inst); } free_triple(zt1); } @@ -495,17 +499,37 @@ if (buff[0]) { triple = g_strsplit(buff, ",", 3); if (triple[0] && triple[1] && triple[2]) { + char *tmp = g_strdup_printf("%s@%s", g_getenv("USER"), + ZGetRealm()); + char *atptr; sub.zsub_class = triple[0]; sub.zsub_classinst = triple[1]; if (!g_strcasecmp(triple[2], "%me%")) { recip = g_strdup_printf("%s@%s", g_getenv("USER"), ZGetRealm()); } else if (!g_strcasecmp(triple[2], "*")) { - /* wildcard */ - recip = g_strdup_printf("@%s", ZGetRealm()); + /* wildcard + * form of class,instance,* */ + recip = g_malloc0(1); + } else if (!g_strcasecmp(triple[2], tmp)) { + /* form of class,instance,aat...@AT... */ + recip = g_strdup(triple[2]); + } else if ((atptr = strchr(triple[2], '@')) != NULL) { + /* form of class,instance,*@ANDREW.CMU.EDU + * class,instance,@ANDREW.CMU.EDU + * If realm is local realm, blank recipient, else + * @REALM-NAME + */ + char *realmat = g_strdup_printf("@%s", ZGetRealm()); + if (!g_strcasecmp(atptr, realmat)) + recip = g_malloc0(1); + else + recip = g_strdup(atptr); + g_free(realmat); } else { recip = g_strdup(triple[2]); } + g_free(tmp); sub.zsub_recipient = recip; if (ZSubscribeTo(&sub, 1, 0) != ZERR_NONE) { debug_printf("Zephyr: Couldn't subscribe to %s, %s, " @@ -574,7 +598,7 @@ process_zsubs(); nottimer = g_timeout_add(100, check_notify, NULL); - loctimer = g_timeout_add(2000, check_loc, NULL); + loctimer = g_timeout_add(20000, check_loc, NULL); } static void write_zsubs() |
From: Eric W. <war...@us...> - 2001-11-27 20:54:21
|
Update of /cvsroot/gaim/gaim In directory usw-pr-cvs1:/tmp/cvs-serv2000 Modified Files: ChangeLog Makefile.am TODO Added Files: licq2gaim.pl Log Message: thanks Arturo Cisneros, Jr. --- NEW FILE: licq2gaim.pl --- #!/usr/bin/perl -w # licq2gaim.pl # # Arturo Cisneros, Jr <ac...@ha...> # GPL'd use strict; my $DIR = "$ENV{HOME}/.licq"; my $GAIM = "$ENV{HOME}/.gaim"; my (@UINS, %USERS) = (); my $OWNER = ""; get_uins(); foreach my $uin (@UINS) { $USERS{$uin} = get_alias($uin); } get_owner(); write_list(); sub get_uins { opendir(DIR, "$DIR/users") or die "Couldn't open dir $DIR/users/: $!"; @UINS = grep !/^\./, readdir DIR; closedir(DIR); } sub get_owner { my @foo = (); open(FILE, "<$DIR/owner.uin") or die "Couldn't open file $DIR/owner.uin $!"; while(<FILE>) { next unless /^Uin/; @foo = split; last; } close(FILE); $OWNER = $foo[2]; } sub get_alias { my @foo = (); open(FILE, "<$DIR/users/$_[0]") or die "Couldn't open $DIR/users/$_[0]: $!"; while(<FILE>) { next unless /^Alias/; @foo = split / /, $_, 3; last; } close(FILE); return $foo[2]; } sub write_list { # Backup Original if( -e "$GAIM/$OWNER.3.blist") { rename("$GAIM/$OWNER.3.blist","$GAIM/$OWNER.3.bak"); } # Write new file open(FILE, ">$GAIM/$OWNER.3.blist") or die "Couldn't open file for writing: $!"; print FILE "m 1\n"; print FILE "g ICQBuddies\n"; while(my($key, $value) = each %USERS) { $key =~ s/\.uin$//; print FILE "b $key:$value"; } close(FILE); } Index: ChangeLog =================================================================== RCS file: /cvsroot/gaim/gaim/ChangeLog,v retrieving revision 1.360 retrieving revision 1.361 diff -u -d -r1.360 -r1.361 --- ChangeLog 2001/11/26 21:55:53 1.360 +++ ChangeLog 2001/11/27 20:54:17 1.361 @@ -8,6 +8,8 @@ resized ICQ icons) * Updated Dutch translation (thanks Floris Eshuis) * Option to show aliases in conversation tabs + * Option to hide windows after sending messages + * licq2gaim.pl conversion script (thanks Arturo Cisneros, Jr.) version 0.48 (11/18/2001): * Right-click on links to open/copy URL Index: Makefile.am =================================================================== RCS file: /cvsroot/gaim/gaim/Makefile.am,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- Makefile.am 2001/10/09 23:40:18 1.29 +++ Makefile.am 2001/11/27 20:54:17 1.30 @@ -1,6 +1,6 @@ EXTRA_DIST = gaim.spec.in gaim_applet.gnorba gaim.desktop gaim_applet.desktop \ - HACKING STATUS gaim2blt.pl + HACKING STATUS gaim2blt.pl licq2gaim.pl if DISTRIB Index: TODO =================================================================== RCS file: /cvsroot/gaim/gaim/TODO,v retrieving revision 1.126 retrieving revision 1.127 diff -u -d -r1.126 -r1.127 --- TODO 2001/11/15 22:47:02 1.126 +++ TODO 2001/11/27 20:54:17 1.127 @@ -25,6 +25,8 @@ *cough*GTK*cough* that they don't. Need to write the core side of the core-ui protocol + Non-blocking gethostbyname() + Cancelable proxy_connect ---- THE PROTOCOLS: |
From: Eric W. <war...@us...> - 2001-11-27 20:51:03
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv799 Modified Files: conversation.c Log Message: whoops. Index: conversation.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/conversation.c,v retrieving revision 1.306 retrieving revision 1.307 diff -u -d -r1.306 -r1.307 --- conversation.c 2001/11/26 22:33:21 1.306 +++ conversation.c 2001/11/27 20:50:58 1.307 @@ -360,7 +360,8 @@ FILE *f; if (file_is_dir(filename, wid)) return; - if (g_list_find(conversations, c)) + if ((!c->is_chat && g_list_find(conversations, c)) || + (c->is_chat && g_slist_find(connections, c->gc) && g_slist_find(c->gc->buddy_chats, c))) filename = g_strdup(filename); else filename = NULL; |
From: Rob F. <rob...@us...> - 2001-11-27 16:46:14
|
Update of /cvsroot/gaim/gaim/src/protocols/irc In directory usw-pr-cvs1:/tmp/cvs-serv26332 Modified Files: irc.c Log Message: I'm so damn lazy. Index: irc.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/irc/irc.c,v retrieving revision 1.59 retrieving revision 1.60 diff -u -d -r1.59 -r1.60 --- irc.c 2001/11/26 20:39:53 1.59 +++ irc.c 2001/11/27 16:46:11 1.60 @@ -1299,7 +1299,7 @@ else g_snprintf(buf, sizeof(buf), "KICK %s %s\r\n", who, word[2]); irc_write(id->fd, buf, strlen(buf)); - } else if (!g_strcasecmp(pdibuf, "JOIN")) { + } else if (!g_strcasecmp(pdibuf, "JOIN") || !g_strcasecmp(pdibuf, "J")) { if (!*word[2]) return -EINVAL; if (*word[3]) |
From: Eric W. <war...@us...> - 2001-11-27 09:57:51
|
Update of /cvsroot/gaim/gaim/src/protocols/jabber In directory usw-pr-cvs1:/tmp/cvs-serv16654/protocols/jabber Modified Files: jabber.c Log Message: hm Index: jabber.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/jabber/jabber.c,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- jabber.c 2001/11/26 20:39:53 1.28 +++ jabber.c 2001/11/27 09:57:48 1.29 @@ -126,6 +126,7 @@ GSList *existing_chats; GHashTable *hash; time_t idle; + gboolean die; }; struct jabber_chat { @@ -332,9 +333,12 @@ return; if ((len = read(j->fd, buf, sizeof(buf) - 1))) { + struct jabber_data *jd = GJ_GC(j)->proto_data; buf[len] = '\0'; debug_printf("input (len %d): %s\n", len, buf); XML_Parse(j->parser, buf, len, 0); + if (jd->die) + signoff(GJ_GC(j)); } else if (len <= 0) { STATE_EVT(JCONN_STATE_OFF) } @@ -983,6 +987,7 @@ xmlnode xerr; char *errmsg = NULL; int errcode = 0; + struct jabber_data *jd = GJ_GC(j)->proto_data; debug_printf("auth failed\n"); xerr = xmlnode_get_tag(p->x, "error"); @@ -999,7 +1004,7 @@ hide_login_progress(GJ_GC(j), "Unknown login error"); } - signoff(GJ_GC(j)); + jd->die = TRUE; } } |
From: Eric W. <war...@us...> - 2001-11-27 03:30:44
|
Update of /cvsroot/gaim/gaim/src/protocols/oscar In directory usw-pr-cvs1:/tmp/cvs-serv28690/protocols/oscar Modified Files: oscar.c Log Message: this might be better Index: oscar.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/oscar.c,v retrieving revision 1.74 retrieving revision 1.75 diff -u -d -r1.74 -r1.75 --- oscar.c 2001/11/27 00:54:01 1.74 +++ oscar.c 2001/11/27 03:30:41 1.75 @@ -1626,11 +1626,11 @@ g_show_info_text(gc, info->sn, 0, header, (prof && *prof) ? away_subs(prof, gc->username) : NULL, + (prof && *prof) ? "<BR><HR><BR>" : NULL, NULL); } } else { g_show_info_text(gc, info->sn, 1, - "<BR><HR><BR>", (prof && *prof) ? away_subs(prof, gc->username) : _("<i>No Information Provided</i>"), legend, |
From: Eric W. <war...@us...> - 2001-11-27 01:09:40
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv32342 Modified Files: dialogs.c Log Message: Thanks, Decklin. I appreciate it. Index: dialogs.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/dialogs.c,v retrieving revision 1.292 retrieving revision 1.293 diff -u -d -r1.292 -r1.293 --- dialogs.c 2001/11/26 20:39:53 1.292 +++ dialogs.c 2001/11/27 01:09:33 1.293 @@ -2055,7 +2055,7 @@ gtk_file_selection_hide_fileop_buttons(GTK_FILE_SELECTION(c->log_dialog)); - g_snprintf(buf, BUF_LEN - 1, "%s/%s.log", getenv("HOME"), c->name); + g_snprintf(buf, BUF_LEN - 1, "%s/%s.log", getenv("HOME"), normalize(c->name)); gtk_object_set_user_data(GTK_OBJECT(c->log_dialog), "log dialog"); gtk_file_selection_set_filename(GTK_FILE_SELECTION(c->log_dialog), buf); gtk_signal_connect(GTK_OBJECT(c->log_dialog), "delete_event", |
From: Eric W. <war...@us...> - 2001-11-27 00:54:04
|
Update of /cvsroot/gaim/gaim/src/protocols/oscar In directory usw-pr-cvs1:/tmp/cvs-serv29460 Modified Files: oscar.c Log Message: (16:50:36) LSchiere: warmenhoven: did something happen to the %n substitution in away messages in today's cvs? (16:51:20) warmenhoven: oh, probably. Index: oscar.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/oscar.c,v retrieving revision 1.73 retrieving revision 1.74 diff -u -d -r1.73 -r1.74 --- oscar.c 2001/11/26 20:39:54 1.73 +++ oscar.c 2001/11/27 00:54:01 1.74 @@ -1619,19 +1619,20 @@ if (evilhack) { g_show_info_text(gc, info->sn, 2, header, - (prof && *prof) ? prof : + (prof && *prof) ? away_subs(prof, gc->username) : _("<i>User has no away message</i>"), legend, NULL); } else { g_show_info_text(gc, info->sn, 0, header, - (prof && *prof) ? prof : NULL, + (prof && *prof) ? away_subs(prof, gc->username) : NULL, NULL); } } else { g_show_info_text(gc, info->sn, 1, "<BR><HR><BR>", - (prof && *prof) ? prof : _("<i>No Information Provided</i>"), + (prof && *prof) ? away_subs(prof, gc->username) : + _("<i>No Information Provided</i>"), legend, NULL); } |
From: Eric W. <war...@us...> - 2001-11-26 23:20:43
|
Update of /cvsroot/gaim/gaim In directory usw-pr-cvs1:/tmp/cvs-serv7542 Modified Files: configure.ac Log Message: don't need the crypt checks anymore. i hate solaris. Index: configure.ac =================================================================== RCS file: /cvsroot/gaim/gaim/configure.ac,v retrieving revision 1.33 retrieving revision 1.34 diff -u -d -r1.33 -r1.34 --- configure.ac 2001/11/17 00:37:07 1.33 +++ configure.ac 2001/11/26 23:20:40 1.34 @@ -345,12 +345,6 @@ AC_CHECK_FUNCS(snprintf connect) AC_CHECK_LIB(nsl, gethostent) -dnl checks for yahoo -AC_CHECK_HEADERS(crypt.h) -CRYPT_LIBS= -AC_CHECK_FUNC(crypt, , CRYPT_LIBS=-lcrypt) -AC_SUBST(CRYPT_LIBS) - dnl checks for zephyr AC_DEFINE(ZEPHYR_INT32, long) AC_SUBST(KRB4_CFLAGS) |
From: Eric W. <war...@us...> - 2001-11-26 23:18:40
|
Update of /cvsroot/gaim/gaim/src/protocols/yahoo In directory usw-pr-cvs1:/tmp/cvs-serv6934/protocols/yahoo Modified Files: .cvsignore Makefile.am yahoo.c Added Files: crypt.c md5.c md5.h Log Message: i hate solaris --- NEW FILE: crypt.c --- /* One way encryption based on MD5 sum. Copyright (C) 1996, 1997, 1999, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <dr...@cy...>, 1996. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ /* warmenhoven took this file and made it work with the md5.[ch] we * already had. isn't that lovely. people should just use linux or * freebsd, crypt works properly on those systems. i hate solaris */ #include <string.h> #include <stdlib.h> #include <glib.h> #include "md5.h" /* Define our magic string to mark salt for MD5 "encryption" replacement. This is meant to be the same as for other MD5 based encryption implementations. */ static const char md5_salt_prefix[] = "$1$"; /* Table with characters for base64 transformation. */ static const char b64t[64] = "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; char *yahoo_crypt(char *key, char *salt) { static char *buffer = NULL; static int buflen = 0; int needed = 3 + strlen (salt) + 1 + 26 + 1; md5_byte_t alt_result[16]; md5_state_t ctx; md5_state_t alt_ctx; size_t salt_len; size_t key_len; size_t cnt; char *cp; if (buflen < needed) { buflen = needed; if ((buffer = g_realloc(buffer, buflen)) == NULL) return NULL; } /* Find beginning of salt string. The prefix should normally always be present. Just in case it is not. */ if (strncmp (md5_salt_prefix, salt, sizeof (md5_salt_prefix) - 1) == 0) /* Skip salt prefix. */ salt += sizeof (md5_salt_prefix) - 1; salt_len = MIN (strcspn (salt, "$"), 8); key_len = strlen (key); /* Prepare for the real work. */ md5_init(&ctx); /* Add the key string. */ md5_append(&ctx, key, key_len); /* Because the SALT argument need not always have the salt prefix we add it separately. */ md5_append(&ctx, md5_salt_prefix, sizeof (md5_salt_prefix) - 1); /* The last part is the salt string. This must be at most 8 characters and it ends at the first `$' character (for compatibility which existing solutions). */ md5_append(&ctx, salt, salt_len); /* Compute alternate MD5 sum with input KEY, SALT, and KEY. The final result will be added to the first context. */ md5_init(&alt_ctx); /* Add key. */ md5_append(&alt_ctx, key, key_len); /* Add salt. */ md5_append(&alt_ctx, salt, salt_len); /* Add key again. */ md5_append(&alt_ctx, key, key_len); /* Now get result of this (16 bytes) and add it to the other context. */ md5_finish(&alt_ctx, alt_result); /* Add for any character in the key one byte of the alternate sum. */ for (cnt = key_len; cnt > 16; cnt -= 16) md5_append(&ctx, alt_result, 16); md5_append(&ctx, alt_result, cnt); /* For the following code we need a NUL byte. */ alt_result[0] = '\0'; /* The original implementation now does something weird: for every 1 bit in the key the first 0 is added to the buffer, for every 0 bit the first character of the key. This does not seem to be what was intended but we have to follow this to be compatible. */ for (cnt = key_len; cnt > 0; cnt >>= 1) md5_append(&ctx, (cnt & 1) != 0 ? alt_result : (md5_byte_t *)key, 1); /* Create intermediate result. */ md5_finish(&ctx, alt_result); /* Now comes another weirdness. In fear of password crackers here comes a quite long loop which just processes the output of the previous round again. We cannot ignore this here. */ for (cnt = 0; cnt < 1000; ++cnt) { /* New context. */ md5_init(&ctx); /* Add key or last result. */ if ((cnt & 1) != 0) md5_append(&ctx, key, key_len); else md5_append(&ctx, alt_result, 16); /* Add salt for numbers not divisible by 3. */ if (cnt % 3 != 0) md5_append(&ctx, salt, salt_len); /* Add key for numbers not divisible by 7. */ if (cnt % 7 != 0) md5_append(&ctx, key, key_len); /* Add key or last result. */ if ((cnt & 1) != 0) md5_append(&ctx, alt_result, 16); else md5_append(&ctx, key, key_len); /* Create intermediate result. */ md5_finish(&ctx, alt_result); } /* Now we can construct the result string. It consists of three parts. */ strncpy(buffer, md5_salt_prefix, MAX (0, buflen)); cp = buffer + strlen(buffer); buflen -= sizeof (md5_salt_prefix); strncpy(cp, salt, MIN ((size_t) buflen, salt_len)); cp = cp + strlen(cp); buflen -= MIN ((size_t) buflen, salt_len); if (buflen > 0) { *cp++ = '$'; --buflen; } #define b64_from_24bit(B2, B1, B0, N) \ do { \ unsigned int w = ((B2) << 16) | ((B1) << 8) | (B0); \ int n = (N); \ while (n-- > 0 && buflen > 0) { \ *cp++ = b64t[w & 0x3f]; \ --buflen; \ w >>= 6; \ }\ } while (0) b64_from_24bit (alt_result[0], alt_result[6], alt_result[12], 4); b64_from_24bit (alt_result[1], alt_result[7], alt_result[13], 4); b64_from_24bit (alt_result[2], alt_result[8], alt_result[14], 4); b64_from_24bit (alt_result[3], alt_result[9], alt_result[15], 4); b64_from_24bit (alt_result[4], alt_result[10], alt_result[5], 4); b64_from_24bit (0, 0, alt_result[11], 2); if (buflen <= 0) { g_free(buffer); buffer = NULL; } else *cp = '\0'; /* Terminate the string. */ /* Clear the buffer for the intermediate result so that people attaching to processes or reading core dumps cannot get any information. We do it in this way to clear correct_words[] inside the MD5 implementation as well. */ md5_init(&ctx); md5_finish(&ctx, alt_result); memset (&ctx, '\0', sizeof (ctx)); memset (&alt_ctx, '\0', sizeof (alt_ctx)); return buffer; } --- NEW FILE: md5.c --- /* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. L. Peter Deutsch gh...@al... */ /* Independent implementation of MD5 (RFC 1321). This code implements the MD5 Algorithm defined in RFC 1321. It is derived directly from the text of the RFC and not from the reference implementation. The original and principal author of md5.c is L. Peter Deutsch <gh...@al...>. Other authors are noted in the change history that follows (in reverse chronological order): 1999-11-04 lpd Edited comments slightly for automatic TOC extraction. 1999-10-18 lpd Fixed typo in header comment (ansi2knr rather than md5). 1999-05-03 lpd Original version. */ #include "md5.h" #include <string.h> #ifdef TEST /* * Compile with -DTEST to create a self-contained executable test program. * The test program should print out the same values as given in section * A.5 of RFC 1321, reproduced below. */ #include <string.h> main() { static const char *const test[7] = { "", /*d41d8cd98f00b204e9800998ecf8427e*/ "945399884.61923487334tuvga", /*0cc175b9c0f1b6a831c399e269772661*/ "abc", /*900150983cd24fb0d6963f7d28e17f72*/ "message digest", /*f96b697d7cb7938d525a2f31aaf161d0*/ "abcdefghijklmnopqrstuvwxyz", /*c3fcd3d76192e4007dfb496cca67e13b*/ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", /*d174ab98d277d9f5a5611c2c9f419d9f*/ "12345678901234567890123456789012345678901234567890123456789012345678901234567890" /*57edf4a22be3c955ac49da2e2107b67a*/ }; int i; for (i = 0; i < 7; ++i) { md5_state_t state; md5_byte_t digest[16]; int di; md5_init(&state); md5_append(&state, (const md5_byte_t *)test[i], strlen(test[i])); md5_finish(&state, digest); printf("MD5 (\"%s\") = ", test[i]); for (di = 0; di < 16; ++di) printf("%02x", digest[di]); printf("\n"); } return 0; } #endif /* TEST */ /* * For reference, here is the program that computed the T values. */ #if 0 #include <math.h> main() { int i; for (i = 1; i <= 64; ++i) { unsigned long v = (unsigned long)(4294967296.0 * fabs(sin((double)i))); printf("#define T%d 0x%08lx\n", i, v); } return 0; } #endif /* * End of T computation program. */ #define T1 0xd76aa478 #define T2 0xe8c7b756 #define T3 0x242070db #define T4 0xc1bdceee #define T5 0xf57c0faf #define T6 0x4787c62a #define T7 0xa8304613 #define T8 0xfd469501 #define T9 0x698098d8 #define T10 0x8b44f7af #define T11 0xffff5bb1 #define T12 0x895cd7be #define T13 0x6b901122 #define T14 0xfd987193 #define T15 0xa679438e #define T16 0x49b40821 #define T17 0xf61e2562 #define T18 0xc040b340 #define T19 0x265e5a51 #define T20 0xe9b6c7aa #define T21 0xd62f105d #define T22 0x02441453 #define T23 0xd8a1e681 #define T24 0xe7d3fbc8 #define T25 0x21e1cde6 #define T26 0xc33707d6 #define T27 0xf4d50d87 #define T28 0x455a14ed #define T29 0xa9e3e905 #define T30 0xfcefa3f8 #define T31 0x676f02d9 #define T32 0x8d2a4c8a #define T33 0xfffa3942 #define T34 0x8771f681 #define T35 0x6d9d6122 #define T36 0xfde5380c #define T37 0xa4beea44 #define T38 0x4bdecfa9 #define T39 0xf6bb4b60 #define T40 0xbebfbc70 #define T41 0x289b7ec6 #define T42 0xeaa127fa #define T43 0xd4ef3085 #define T44 0x04881d05 #define T45 0xd9d4d039 #define T46 0xe6db99e5 #define T47 0x1fa27cf8 #define T48 0xc4ac5665 #define T49 0xf4292244 #define T50 0x432aff97 #define T51 0xab9423a7 #define T52 0xfc93a039 #define T53 0x655b59c3 #define T54 0x8f0ccc92 #define T55 0xffeff47d #define T56 0x85845dd1 #define T57 0x6fa87e4f #define T58 0xfe2ce6e0 #define T59 0xa3014314 #define T60 0x4e0811a1 #define T61 0xf7537e82 #define T62 0xbd3af235 #define T63 0x2ad7d2bb #define T64 0xeb86d391 static void md5_process(md5_state_t *pms, const md5_byte_t *data /*[64]*/) { md5_word_t a = pms->abcd[0], b = pms->abcd[1], c = pms->abcd[2], d = pms->abcd[3]; md5_word_t t; #ifndef ARCH_IS_BIG_ENDIAN # define ARCH_IS_BIG_ENDIAN 1 /* slower, default implementation */ #endif #if ARCH_IS_BIG_ENDIAN /* * On big-endian machines, we must arrange the bytes in the right * order. (This also works on machines of unknown byte order.) */ md5_word_t X[16]; const md5_byte_t *xp = data; int i; for (i = 0; i < 16; ++i, xp += 4) X[i] = xp[0] + (xp[1] << 8) + (xp[2] << 16) + (xp[3] << 24); #else /* !ARCH_IS_BIG_ENDIAN */ /* * On little-endian machines, we can process properly aligned data * without copying it. */ md5_word_t xbuf[16]; const md5_word_t *X; if (!((data - (const md5_byte_t *)0) & 3)) { /* data are properly aligned */ X = (const md5_word_t *)data; } else { /* not aligned */ memcpy(xbuf, data, 64); X = xbuf; } #endif #define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32 - (n)))) /* Round 1. */ /* Let [abcd k s i] denote the operation a = b + ((a + F(b,c,d) + X[k] + T[i]) <<< s). */ #define F(x, y, z) (((x) & (y)) | (~(x) & (z))) #define SET(a, b, c, d, k, s, Ti)\ t = a + F(b,c,d) + X[k] + Ti;\ a = ROTATE_LEFT(t, s) + b /* Do the following 16 operations. */ SET(a, b, c, d, 0, 7, T1); SET(d, a, b, c, 1, 12, T2); SET(c, d, a, b, 2, 17, T3); SET(b, c, d, a, 3, 22, T4); SET(a, b, c, d, 4, 7, T5); SET(d, a, b, c, 5, 12, T6); SET(c, d, a, b, 6, 17, T7); SET(b, c, d, a, 7, 22, T8); SET(a, b, c, d, 8, 7, T9); SET(d, a, b, c, 9, 12, T10); SET(c, d, a, b, 10, 17, T11); SET(b, c, d, a, 11, 22, T12); SET(a, b, c, d, 12, 7, T13); SET(d, a, b, c, 13, 12, T14); SET(c, d, a, b, 14, 17, T15); SET(b, c, d, a, 15, 22, T16); #undef SET /* Round 2. */ /* Let [abcd k s i] denote the operation a = b + ((a + G(b,c,d) + X[k] + T[i]) <<< s). */ #define G(x, y, z) (((x) & (z)) | ((y) & ~(z))) #define SET(a, b, c, d, k, s, Ti)\ t = a + G(b,c,d) + X[k] + Ti;\ a = ROTATE_LEFT(t, s) + b /* Do the following 16 operations. */ SET(a, b, c, d, 1, 5, T17); SET(d, a, b, c, 6, 9, T18); SET(c, d, a, b, 11, 14, T19); SET(b, c, d, a, 0, 20, T20); SET(a, b, c, d, 5, 5, T21); SET(d, a, b, c, 10, 9, T22); SET(c, d, a, b, 15, 14, T23); SET(b, c, d, a, 4, 20, T24); SET(a, b, c, d, 9, 5, T25); SET(d, a, b, c, 14, 9, T26); SET(c, d, a, b, 3, 14, T27); SET(b, c, d, a, 8, 20, T28); SET(a, b, c, d, 13, 5, T29); SET(d, a, b, c, 2, 9, T30); SET(c, d, a, b, 7, 14, T31); SET(b, c, d, a, 12, 20, T32); #undef SET /* Round 3. */ /* Let [abcd k s t] denote the operation a = b + ((a + H(b,c,d) + X[k] + T[i]) <<< s). */ #define H(x, y, z) ((x) ^ (y) ^ (z)) #define SET(a, b, c, d, k, s, Ti)\ t = a + H(b,c,d) + X[k] + Ti;\ a = ROTATE_LEFT(t, s) + b /* Do the following 16 operations. */ SET(a, b, c, d, 5, 4, T33); SET(d, a, b, c, 8, 11, T34); SET(c, d, a, b, 11, 16, T35); SET(b, c, d, a, 14, 23, T36); SET(a, b, c, d, 1, 4, T37); SET(d, a, b, c, 4, 11, T38); SET(c, d, a, b, 7, 16, T39); SET(b, c, d, a, 10, 23, T40); SET(a, b, c, d, 13, 4, T41); SET(d, a, b, c, 0, 11, T42); SET(c, d, a, b, 3, 16, T43); SET(b, c, d, a, 6, 23, T44); SET(a, b, c, d, 9, 4, T45); SET(d, a, b, c, 12, 11, T46); SET(c, d, a, b, 15, 16, T47); SET(b, c, d, a, 2, 23, T48); #undef SET /* Round 4. */ /* Let [abcd k s t] denote the operation a = b + ((a + I(b,c,d) + X[k] + T[i]) <<< s). */ #define I(x, y, z) ((y) ^ ((x) | ~(z))) #define SET(a, b, c, d, k, s, Ti)\ t = a + I(b,c,d) + X[k] + Ti;\ a = ROTATE_LEFT(t, s) + b /* Do the following 16 operations. */ SET(a, b, c, d, 0, 6, T49); SET(d, a, b, c, 7, 10, T50); SET(c, d, a, b, 14, 15, T51); SET(b, c, d, a, 5, 21, T52); SET(a, b, c, d, 12, 6, T53); SET(d, a, b, c, 3, 10, T54); SET(c, d, a, b, 10, 15, T55); SET(b, c, d, a, 1, 21, T56); SET(a, b, c, d, 8, 6, T57); SET(d, a, b, c, 15, 10, T58); SET(c, d, a, b, 6, 15, T59); SET(b, c, d, a, 13, 21, T60); SET(a, b, c, d, 4, 6, T61); SET(d, a, b, c, 11, 10, T62); SET(c, d, a, b, 2, 15, T63); SET(b, c, d, a, 9, 21, T64); #undef SET /* Then perform the following additions. (That is increment each of the four registers by the value it had before this block was started.) */ pms->abcd[0] += a; pms->abcd[1] += b; pms->abcd[2] += c; pms->abcd[3] += d; } void md5_init(md5_state_t *pms) { pms->count[0] = pms->count[1] = 0; pms->abcd[0] = 0x67452301; pms->abcd[1] = 0xefcdab89; pms->abcd[2] = 0x98badcfe; pms->abcd[3] = 0x10325476; } void md5_append(md5_state_t *pms, const md5_byte_t *data, int nbytes) { const md5_byte_t *p = data; int left = nbytes; int offset = (pms->count[0] >> 3) & 63; md5_word_t nbits = (md5_word_t)(nbytes << 3); if (nbytes <= 0) return; /* Update the message length. */ pms->count[1] += nbytes >> 29; pms->count[0] += nbits; if (pms->count[0] < nbits) pms->count[1]++; /* Process an initial partial block. */ if (offset) { int copy = (offset + nbytes > 64 ? 64 - offset : nbytes); memcpy(pms->buf + offset, p, copy); if (offset + copy < 64) return; p += copy; left -= copy; md5_process(pms, pms->buf); } /* Process full blocks. */ for (; left >= 64; p += 64, left -= 64) md5_process(pms, p); /* Process a final partial block. */ if (left) memcpy(pms->buf, p, left); } void md5_finish(md5_state_t *pms, md5_byte_t digest[16]) { static const md5_byte_t pad[64] = { 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; md5_byte_t data[8]; int i; /* Save the length before padding. */ for (i = 0; i < 8; ++i) data[i] = (md5_byte_t)(pms->count[i >> 2] >> ((i & 3) << 3)); /* Pad to 56 bytes mod 64. */ md5_append(pms, pad, ((55 - (pms->count[0] >> 3)) & 63) + 1); /* Append the length. */ md5_append(pms, data, 8); for (i = 0; i < 16; ++i) digest[i] = (md5_byte_t)(pms->abcd[i >> 2] >> ((i & 3) << 3)); } --- NEW FILE: md5.h --- /* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. L. Peter Deutsch gh...@al... */ /* Independent implementation of MD5 (RFC 1321). This code implements the MD5 Algorithm defined in RFC 1321. It is derived directly from the text of the RFC and not from the reference implementation. The original and principal author of md5.h is L. Peter Deutsch <gh...@al...>. Other authors are noted in the change history that follows (in reverse chronological order): 1999-11-04 lpd Edited comments slightly for automatic TOC extraction. 1999-10-18 lpd Fixed typo in header comment (ansi2knr rather than md5); added conditionalization for C++ compilation from Martin Purschke <pur...@bn...>. 1999-05-03 lpd Original version. */ #ifndef md5_INCLUDED # define md5_INCLUDED /* * This code has some adaptations for the Ghostscript environment, but it * will compile and run correctly in any environment with 8-bit chars and * 32-bit ints. Specifically, it assumes that if the following are * defined, they have the same meaning as in Ghostscript: P1, P2, P3, * ARCH_IS_BIG_ENDIAN. */ typedef unsigned char md5_byte_t; /* 8-bit byte */ typedef unsigned int md5_word_t; /* 32-bit word */ /* Define the state of the MD5 Algorithm. */ typedef struct md5_state_s { md5_word_t count[2]; /* message length in bits, lsw first */ md5_word_t abcd[4]; /* digest buffer */ md5_byte_t buf[64]; /* accumulate block */ } md5_state_t; #ifdef __cplusplus extern "C" { #endif /* Initialize the algorithm. */ #ifdef P1 void md5_init(P1(md5_state_t *pms)); #else void md5_init(md5_state_t *pms); #endif /* Append a string to the message. */ #ifdef P3 void md5_append(P3(md5_state_t *pms, const md5_byte_t *data, int nbytes)); #else void md5_append(md5_state_t *pms, const md5_byte_t *data, int nbytes); #endif /* Finish the message and return the digest. */ #ifdef P2 void md5_finish(P2(md5_state_t *pms, md5_byte_t digest[16])); #else void md5_finish(md5_state_t *pms, md5_byte_t digest[16]); #endif #ifdef __cplusplus } /* end extern "C" */ #endif #endif /* md5_INCLUDED */ Index: .cvsignore =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/yahoo/.cvsignore,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- .cvsignore 2001/11/06 23:58:24 1.2 +++ .cvsignore 2001/11/26 23:18:36 1.3 @@ -11,3 +11,5 @@ rxhandlers.lo yay.lo yahoo.lo +md5.lo +crypt.lo Index: Makefile.am =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/yahoo/Makefile.am,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- Makefile.am 2001/11/13 06:30:37 1.6 +++ Makefile.am 2001/11/26 23:18:36 1.7 @@ -1,7 +1,8 @@ +EXTRA_DIST = md5.h + pkgdir = $(libdir)/gaim CFLAGS += -I\$(top_srcdir)/src $(st) $(DEBUG_CFLAGS) -LIBS = @LIBS@ $(CRYPT_LIBS) libyahoo_la_LDFLAGS = -avoid-version if STATIC_YAHOO @@ -10,7 +11,7 @@ pkg_LTLIBRARIES = noinst_LIBRARIES = libyahoo.a -libyahoo_a_SOURCES = yahoo.c +libyahoo_a_SOURCES = crypt.c md5.c yahoo.c else @@ -18,6 +19,6 @@ pkg_LTLIBRARIES = libyahoo.la noinst_LIBRARIES = -libyahoo_la_SOURCES = yahoo.c +libyahoo_la_SOURCES = crypt.c md5.c yahoo.c endif Index: yahoo.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/yahoo/yahoo.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- yahoo.c 2001/11/21 01:52:41 1.17 +++ yahoo.c 2001/11/26 23:18:36 1.18 @@ -37,14 +37,13 @@ #include <sys/socket.h> #include <sys/stat.h> #include <ctype.h> -#if HAVE_CRYPT_H -#include <crypt.h> -#endif #include "multi.h" #include "prpl.h" #include "gaim.h" #include "proxy.h" +extern char *yahoo_crypt(char *, char *); + #include "pixmaps/status-away.xpm" #include "pixmaps/status-here.xpm" #include "pixmaps/status-idle.xpm" @@ -782,7 +781,7 @@ yahoo_packet_hash(pkt, 0, gc->username); yahoo_packet_hash(pkt, 1, gc->username); - yahoo_packet_hash(pkt, 6, crypt(gc->password, "$1$_2S43d5f$")); + yahoo_packet_hash(pkt, 6, yahoo_crypt(gc->password, "$1$_2S43d5f$")); yahoo_send_packet(yd, pkt); |