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-07 11:14:38
|
Update of /cvsroot/gaim/gaim/src/protocols/irc In directory usw-pr-cvs1:/tmp/cvs-serv28995/irc Modified Files: irc.c Log Message: Anyone up for some fun! Index: irc.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/irc/irc.c,v retrieving revision 1.54 retrieving revision 1.55 diff -u -d -r1.54 -r1.55 --- irc.c 2001/11/06 23:58:22 1.54 +++ irc.c 2001/11/07 11:14:33 1.55 @@ -52,6 +52,9 @@ gboolean online; guint32 timer; + char *rxqueue; + int rxlen; + GString *str; int bc; @@ -775,58 +778,32 @@ /* XXX should probably write_to_conv or something here */ } -static void irc_callback(gpointer data, gint source, GaimInputCondition condition) +static gboolean irc_parse(struct gaim_connection *gc, char *buf) { - struct gaim_connection *gc = data; struct irc_data *idata = gc->proto_data; - int i = 0; - gchar d[IRC_BUF_LEN], *buf = d; gchar outbuf[IRC_BUF_LEN]; char *word[PDIWORDS], *word_eol[PDIWORDS]; char pdibuf[522]; char *ex, ip[128], nick[128]; char *cmd; - if (!idata->online) { - /* Now lets sign ourselves on */ - account_online(gc); - serv_finish_login(gc); - - if (bud_list_cache_exists(gc)) - do_import(gc, NULL); - - /* we don't call this now because otherwise some IRC servers might not like us */ - idata->timer = g_timeout_add(20000, irc_request_buddy_update, gc); - idata->online = TRUE; - } - - do { - if (read(idata->fd, buf + i, 1) <= 0) { - hide_login_progress(gc, "Read error"); - signoff(gc); - return; - } - } while (buf[i++] != '\n'); - - buf[--i] = '\0'; - g_strchomp(buf); - debug_printf("IRC S: %s\n", buf); - /* Check for errors */ if (*buf != ':') { if (!strncmp(buf, "NOTICE ", 7)) buf += 7; if (!strncmp(buf, "PING ", 5)) { + int r = FALSE; g_snprintf(outbuf, sizeof(outbuf), "PONG %s\r\n", buf + 5); if (irc_write(idata->fd, outbuf, strlen(outbuf)) < 0) { hide_login_progress(gc, _("Unable to write")); signoff(gc); + r = TRUE; } - return; + return r; } /* XXX doesn't handle ERROR */ - return; + return FALSE; } buf++; @@ -836,7 +813,7 @@ if (atoi(word[2])) { if (*word_eol[3]) process_numeric(gc, word, word_eol); - return; + return FALSE; } cmd = word[2]; @@ -856,7 +833,7 @@ nick[ex - pdibuf] = 0; /* cut the buffer at the '!' */ } - if (!strcmp(cmd, "INVITE")) { /* */ + if (!strcmp(cmd, "INVITE")) { /* */ } else if (!strcmp(cmd, "JOIN")) { char *chan = *word[3] == ':' ? word[3] + 1 : word[3]; if (!g_strcasecmp(gc->displayname, nick)) { @@ -871,7 +848,7 @@ if (!strcmp(gc->displayname, word[4])) { struct conversation *c = irc_find_chat(gc, word[3]); if (!c) - return; + return FALSE; gc->buddy_chats = g_slist_remove(gc->buddy_chats, c); c->gc = NULL; g_snprintf(outbuf, sizeof(outbuf), _("You have been kicked from %s: %s"), @@ -898,10 +875,10 @@ if (*chan == ':') chan++; if (!(c = irc_find_chat(gc, chan))) - return; + return FALSE; if (!strcmp(nick, gc->displayname)) { serv_got_chat_left(gc, c->id); - return; + return FALSE; } r = c->in_room; while (r) { @@ -921,7 +898,7 @@ } else if (!strcmp(cmd, "PRIVMSG")) { char *to, *msg; if (!*word[3]) - return; + return FALSE; to = word[3]; msg = *word_eol[4] == ':' ? word_eol[4] + 1 : word_eol[4]; if (msg[0] == 1 && msg[strlen (msg) - 1] == 1) { /* ctcp */ @@ -946,6 +923,72 @@ } } else if (!strcmp(cmd, "WALLOPS")) { /* */ } + + return FALSE; +} + +static void irc_callback(gpointer data, gint source, GaimInputCondition condition) +{ + struct gaim_connection *gc = data; + struct irc_data *idata = gc->proto_data; + int i = 0; + gchar buf[1024]; + gboolean off; + + if (!idata->online) { + /* Now lets sign ourselves on */ + account_online(gc); + serv_finish_login(gc); + + if (bud_list_cache_exists(gc)) + do_import(gc, NULL); + + /* we don't call this now because otherwise some IRC servers might not like us */ + idata->timer = g_timeout_add(20000, irc_request_buddy_update, gc); + idata->online = TRUE; + } + + i = read(idata->fd, buf, 1024); + if (i <= 0) { + hide_login_progress(gc, "Read error"); + signoff(gc); + return; + } + + idata->rxqueue = g_realloc(idata->rxqueue, i + idata->rxlen + 1); + memcpy(idata->rxqueue + idata->rxlen, buf, i); + idata->rxlen += i; + idata->rxqueue[idata->rxlen] = 0; + + while (1) { + char *d, *e; + int len; + + if (!idata->rxqueue || ((e = strchr(idata->rxqueue, '\n')) == NULL)) + return; + + len = e - idata->rxqueue + 1; + d = g_strndup(idata->rxqueue, len); + g_strchomp(d); + debug_printf("IRC S: %s\n", d); + + idata->rxlen -= len; + if (idata->rxlen) { + char *tmp = g_strdup(e + 1); + g_free(idata->rxqueue); + idata->rxqueue = tmp; + } else { + g_free(idata->rxqueue); + idata->rxqueue = NULL; + } + + off = irc_parse(gc, d); + + g_free(d); + + if (off) + return; + } } static void irc_login_callback(gpointer data, gint source, GaimInputCondition condition) @@ -1028,6 +1071,11 @@ g_snprintf(buf, sizeof(buf), "QUIT :Download Gaim [%s]\r\n", WEBSITE); irc_write(idata->fd, buf, strlen(buf)); + + if (idata->rxqueue) + g_free(idata->rxqueue); + idata->rxqueue = NULL; + idata->rxlen = 0; g_free(idata->chantypes); g_free(idata->chanmodes); |
From: Eric W. <war...@us...> - 2001-11-07 08:03:22
|
Update of /cvsroot/gaim/gaim/src/protocols/yahoo In directory usw-pr-cvs1:/tmp/cvs-serv31267 Modified Files: Makefile.am yahoo.c Log Message: hi Index: Makefile.am =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/yahoo/Makefile.am,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- Makefile.am 2001/11/07 00:24:56 1.4 +++ Makefile.am 2001/11/07 08:03:20 1.5 @@ -1,5 +1,3 @@ -EXTRA_DIST = AUTHORS - pkgdir = $(libdir)/gaim CFLAGS += -I\$(top_srcdir)/src $(st) $(DEBUG_CFLAGS) Index: yahoo.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/yahoo/yahoo.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- yahoo.c 2001/11/07 00:08:50 1.3 +++ yahoo.c 2001/11/07 08:03:20 1.4 @@ -56,29 +56,29 @@ #define USEROPT_PAGERPORT 4 #define YAHOO_PAGER_PORT 5050 -enum yahoo_service { +enum yahoo_service { /* these are easier to see in hex */ YAHOO_SERVICE_LOGON = 1, YAHOO_SERVICE_LOGOFF, YAHOO_SERVICE_ISAWAY, YAHOO_SERVICE_ISBACK, - YAHOO_SERVICE_IDLE, + YAHOO_SERVICE_IDLE, /* 5 (placemarker) */ YAHOO_SERVICE_MESSAGE, YAHOO_SERVICE_IDACT, YAHOO_SERVICE_IDDEACT, YAHOO_SERVICE_MAILSTAT, - YAHOO_SERVICE_USERSTAT, + YAHOO_SERVICE_USERSTAT, /* 0xa */ YAHOO_SERVICE_NEWMAIL, YAHOO_SERVICE_CHATINVITE, YAHOO_SERVICE_CALENDAR, YAHOO_SERVICE_NEWPERSONALMAIL, YAHOO_SERVICE_NEWCONTACT, - YAHOO_SERVICE_ADDIDENT, + YAHOO_SERVICE_ADDIDENT, /* 0x10 */ YAHOO_SERVICE_ADDIGNORE, YAHOO_SERVICE_PING, YAHOO_SERVICE_GROUPRENAME, - YAHOO_SERVICE_SYSMESSAGE = 20, - YAHOO_SERVICE_PASSTHROUGH2 = 22, - YAHOO_SERVICE_CONFINVITE = 24, + YAHOO_SERVICE_SYSMESSAGE = 0x14, + YAHOO_SERVICE_PASSTHROUGH2 = 0x16, + YAHOO_SERVICE_CONFINVITE = 0x18, YAHOO_SERVICE_CONFLOGON, YAHOO_SERVICE_CONFDECLINE, YAHOO_SERVICE_CONFLOGOFF, @@ -86,17 +86,17 @@ YAHOO_SERVICE_CONFMSG, YAHOO_SERVICE_CHATLOGON, YAHOO_SERVICE_CHATLOGOFF, - YAHOO_SERVICE_CHATMSG = 32, - YAHOO_SERVICE_GAMELOGON = 40, - YAHOO_SERVICE_GAMELOGOFF = 41, - YAHOO_SERVICE_FILETRANSFER = 70, - YAHOO_SERVICE_LIST = 85, - YAHOO_SERVICE_ADDBUDDY = 131, - YAHOO_SERVICE_REMBUDDY = 132 + YAHOO_SERVICE_CHATMSG = 0x20, + YAHOO_SERVICE_GAMELOGON = 0x28, + YAHOO_SERVICE_GAMELOGOFF = 0x29, + YAHOO_SERVICE_FILETRANSFER = 0x46, + YAHOO_SERVICE_LIST = 0x55, + YAHOO_SERVICE_ADDBUDDY = 0x83, + YAHOO_SERVICE_REMBUDDY = 0x84 }; enum yahoo_status { - YAHOO_STATUS_AVAILABLE, + YAHOO_STATUS_AVAILABLE = 0, YAHOO_STATUS_BRB, YAHOO_STATUS_BUSY, YAHOO_STATUS_NOTATHOME, @@ -109,7 +109,7 @@ YAHOO_STATUS_INVISIBLE = 12, YAHOO_STATUS_CUSTOM = 99, YAHOO_STATUS_IDLE = 999, - YAHOO_STATUS_OFFLINE = 0x5a55aa56 + YAHOO_STATUS_OFFLINE = 0x5a55aa56 /* don't ask */ }; struct yahoo_data { |
From: Eric W. <war...@us...> - 2001-11-07 00:46:21
|
Update of /cvsroot/gaim/gaim/po In directory usw-pr-cvs1:/tmp/cvs-serv7545 Modified Files: POTFILES.in Log Message: blah Index: POTFILES.in =================================================================== RCS file: /cvsroot/gaim/gaim/po/POTFILES.in,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- POTFILES.in 2001/09/29 23:06:30 1.12 +++ POTFILES.in 2001/11/07 00:46:18 1.13 @@ -6,7 +6,7 @@ src/protocols/napster/napster.c src/protocols/oscar/oscar.c src/protocols/toc/toc.c -src/protocols/yahoo/yay.c +src/protocols/yahoo/yahoo.c src/protocols/zephyr/zephyr.c src/about.c src/aim.c |
From: Eric W. <war...@us...> - 2001-11-07 00:25:04
|
Update of /cvsroot/gaim/gaim/src/protocols/yahoo In directory usw-pr-cvs1:/tmp/cvs-serv29839 Modified Files: Makefile.am Log Message: The beatings will continue until morale improves. Index: Makefile.am =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/yahoo/Makefile.am,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- Makefile.am 2001/11/06 23:58:24 1.3 +++ Makefile.am 2001/11/07 00:24:56 1.4 @@ -3,6 +3,7 @@ pkgdir = $(libdir)/gaim CFLAGS += -I\$(top_srcdir)/src $(st) $(DEBUG_CFLAGS) +LIBS = @LIBS@ -lcrypt libyahoo_la_LDFLAGS = -avoid-version if STATIC_YAHOO |
From: Eric W. <war...@us...> - 2001-11-07 00:08:55
|
Update of /cvsroot/gaim/gaim/src/protocols/yahoo In directory usw-pr-cvs1:/tmp/cvs-serv23365/protocols/yahoo Modified Files: yahoo.c Log Message: more! yay! Index: yahoo.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/yahoo/yahoo.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- yahoo.c 2001/11/07 00:03:56 1.2 +++ yahoo.c 2001/11/07 00:08:50 1.3 @@ -535,9 +535,14 @@ static void yahoo_process_contact(struct gaim_connection *gc, struct yahoo_packet *pkt) { + struct yahoo_data *yd = gc->proto_data; char *id = NULL; char *who = NULL; char *msg = NULL; + char *name = NULL; + int state = YAHOO_STATUS_AVAILABLE; + int online = FALSE; + GSList *l = pkt->hash; while (l) { @@ -548,11 +553,33 @@ who = pair->value; else if (pair->key == 14) msg = pair->value; + else if (pair->key == 7) + name = pair->value; + else if (pair->key == 10) + state = strtol(pair->value, NULL, 10); + else if (pair->key == 13) + online = strtol(pair->value, NULL, 10); l = l->next; } if (id) show_got_added(gc, id, who, NULL, msg); + if (name) { + 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)); + } + } } static void yahoo_process_mail(struct gaim_connection *gc, struct yahoo_packet *pkt) |
From: Eric W. <war...@us...> - 2001-11-07 00:03:59
|
Update of /cvsroot/gaim/gaim/src/protocols/yahoo In directory usw-pr-cvs1:/tmp/cvs-serv22207 Modified Files: yahoo.c Log Message: forgot this. Index: yahoo.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/yahoo/yahoo.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- yahoo.c 2001/11/06 23:58:24 1.1 +++ yahoo.c 2001/11/07 00:03:56 1.2 @@ -47,7 +47,7 @@ #include "pixmaps/status-here.xpm" #include "pixmaps/status-idle.xpm" -#define YAHOO_DEBUG +#undef YAHOO_DEBUG #define USEROPT_MAIL 0 @@ -551,7 +551,8 @@ l = l->next; } - show_got_added(gc, id, who, NULL, msg); + if (id) + show_got_added(gc, id, who, NULL, msg); } static void yahoo_process_mail(struct gaim_connection *gc, struct yahoo_packet *pkt) |
From: Eric W. <war...@us...> - 2001-11-06 23:58:54
|
Update of /cvsroot/gaim/gaim/src/protocols/icq In directory usw-pr-cvs1:/tmp/cvs-serv20708/src/protocols/icq Modified Files: gaim_icq.c Log Message: don't ask. Index: gaim_icq.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/icq/gaim_icq.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- gaim_icq.c 2001/10/25 05:05:05 1.18 +++ gaim_icq.c 2001/11/06 23:58:21 1.19 @@ -386,7 +386,7 @@ } } -static void icq_rem_buddy(struct gaim_connection *gc, char *who) { +static void icq_rem_buddy(struct gaim_connection *gc, char *who, char *group) { struct icq_data *id = (struct icq_data *)gc->proto_data; icq_ContactRemove(id->link, atol(who)); } |
From: Eric W. <war...@us...> - 2001-11-06 23:58:54
|
Update of /cvsroot/gaim/gaim/src/protocols/gg In directory usw-pr-cvs1:/tmp/cvs-serv20708/src/protocols/gg Modified Files: gg.c Log Message: don't ask. Index: gg.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/gg/gg.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- gg.c 2001/10/21 00:14:41 1.7 +++ gg.c 2001/11/06 23:58:21 1.8 @@ -616,7 +616,7 @@ gg_add_notify(gd->sess, strtol(who, (char **)NULL, 10)); } -static void agg_rem_buddy(struct gaim_connection *gc, char *who) +static void agg_rem_buddy(struct gaim_connection *gc, char *who, char *group) { struct agg_data *gd = (struct agg_data *)gc->proto_data; if (invalid_uin(who)) |
From: Eric W. <war...@us...> - 2001-11-06 23:58:54
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv20708/src Modified Files: buddy.c conversation.c dialogs.c gaim.h list.c prpl.h server.c Log Message: don't ask. Index: buddy.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/buddy.c,v retrieving revision 1.269 retrieving revision 1.270 diff -u -d -r1.269 -r1.270 --- buddy.c 2001/11/04 07:42:28 1.269 +++ buddy.c 2001/11/06 23:58:21 1.270 @@ -999,6 +999,7 @@ * we change the group that the buddy is in */ struct group *old_g, *new_g = (struct group *)ptype; struct buddy *s = NULL, *buddy = (struct buddy *)ctype; + gboolean add = FALSE; int pos; if (buddy->gc != new_g->gc) { @@ -1015,7 +1016,7 @@ og->members = g_slist_remove(og->members, a); } else { /* we don't have this buddy yet; let's add him */ - serv_add_buddy(new_g->gc, buddy->name); + add = TRUE; } } @@ -1035,6 +1036,10 @@ } else new_g->members = g_slist_append(new_g->members, buddy); + /* we do the add after it's added locally so that prpls can find it if necessary */ + if (add) + serv_add_buddy(new_g->gc, buddy->name); + do_export(buddy->gc); if (buddy->gc != new_g->gc) { do_export(new_g->gc); @@ -1245,7 +1250,7 @@ b = (struct buddy *)type; g = find_group_by_buddy(b->gc, b->name); gct = b->gc; - serv_remove_buddy(b->gc, b->name); + serv_remove_buddy(b->gc, b->name, g->name); remove_buddy(b->gc, g, b); gtk_ctree_remove_node(GTK_CTREE(edittree), node); do_export(gct); Index: conversation.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/conversation.c,v retrieving revision 1.289 retrieving revision 1.290 diff -u -d -r1.289 -r1.290 --- conversation.c 2001/11/02 01:41:37 1.289 +++ conversation.c 2001/11/06 23:58:21 1.290 @@ -538,17 +538,17 @@ void add_callback(GtkWidget *widget, struct conversation *c) { - if (c->gc && find_buddy(c->gc, c->name) != NULL) { + struct buddy *b = find_buddy(c->gc, c->name); + if (b) { + struct group *g = find_group_by_buddy(c->gc, c->name); debug_printf(_("Removing '%s' from buddylist.\n"), c->name); - serv_remove_buddy(c->gc, c->name); - remove_buddy(c->gc, find_group_by_buddy(c->gc, c->name), find_buddy(c->gc, c->name)); + serv_remove_buddy(c->gc, c->name, g->name); + remove_buddy(c->gc, g, b); do_export(c->gc); build_edit_tree(); update_convo_add_button(c); - } else { - if (c->gc) - show_add_buddy(c->gc, c->name, NULL, NULL); - } + } else if (c->gc) + show_add_buddy(c->gc, c->name, NULL, NULL); gtk_widget_grab_focus(c->entry); } Index: dialogs.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/dialogs.c,v retrieving revision 1.281 retrieving revision 1.282 diff -u -d -r1.281 -r1.282 --- dialogs.c 2001/11/06 04:40:21 1.281 +++ dialogs.c 2001/11/06 23:58:21 1.282 @@ -3767,13 +3767,32 @@ { char *new_name; struct buddy *b; + GSList *gr; new_name = gtk_entry_get_text(GTK_ENTRY(entry)); b = gtk_object_get_user_data(obj); + if (!g_slist_find(connections, b->gc)) { + destroy_dialog(rename_bud_dialog, rename_bud_dialog); + return; + } + + gr = b->gc->groups; + while (gr) { + if (g_slist_find(((struct group *)gr->data)->members, b)) + break; + gr = gr->next; + } + if (!gr) { + destroy_dialog(rename_bud_dialog, rename_bud_dialog); + return; + } + if (new_name && (strlen(new_name) != 0) && strcmp(new_name, b->name)) { + struct group *g = find_group_by_buddy(b->gc, b->name); char *prevname = g_strdup(b->name); - serv_remove_buddy(b->gc, b->name); + if (g) + serv_remove_buddy(b->gc, b->name, g->name); if (!strcmp(b->name, b->show)) g_snprintf(b->show, sizeof(b->show), "%s", new_name); g_snprintf(b->name, sizeof(b->name), "%s", new_name); Index: gaim.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/gaim.h,v retrieving revision 1.289 retrieving revision 1.290 diff -u -d -r1.289 -r1.290 --- gaim.h 2001/10/25 05:05:04 1.289 +++ gaim.h 2001/11/06 23:58:21 1.290 @@ -362,8 +362,8 @@ extern void serv_change_passwd(struct gaim_connection *, char *, char *); extern void serv_add_buddy(struct gaim_connection *, char *); extern void serv_add_buddies(struct gaim_connection *, GList *); -extern void serv_remove_buddy(struct gaim_connection *, char *); -extern void serv_remove_buddies(struct gaim_connection *, GList *); +extern void serv_remove_buddy(struct gaim_connection *, char *, char *); +extern void serv_remove_buddies(struct gaim_connection *, GList *, char *); extern void serv_add_permit(struct gaim_connection *, char *); extern void serv_add_deny(struct gaim_connection *, char *); extern void serv_rem_permit(struct gaim_connection *, char *); Index: list.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/list.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- list.c 2001/11/02 01:41:37 1.8 +++ list.c 2001/11/06 23:58:21 1.9 @@ -86,7 +86,7 @@ gc->groups = g_slist_remove(gc->groups, delg); - serv_remove_buddies(gc, tmp); + serv_remove_buddies(gc, tmp, rem_g->name); while (tmp) { g_free(tmp->data); tmp = g_list_remove(tmp, tmp->data); Index: prpl.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/prpl.h,v retrieving revision 1.54 retrieving revision 1.55 diff -u -d -r1.54 -r1.55 --- prpl.h 2001/10/25 09:19:25 1.54 +++ prpl.h 2001/11/06 23:58:21 1.55 @@ -127,8 +127,8 @@ void (* change_passwd) (struct gaim_connection *, char *old, char *new); void (* add_buddy) (struct gaim_connection *, char *name); void (* add_buddies) (struct gaim_connection *, GList *buddies); - void (* remove_buddy) (struct gaim_connection *, char *name); - void (* remove_buddies) (struct gaim_connection *, GList *buddies); + void (* remove_buddy) (struct gaim_connection *, char *name, char *group); + void (* remove_buddies) (struct gaim_connection *, GList *buddies, char *group); void (* add_permit) (struct gaim_connection *, char *name); void (* add_deny) (struct gaim_connection *, char *name); void (* rem_permit) (struct gaim_connection *, char *name); Index: server.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/server.c,v retrieving revision 1.206 retrieving revision 1.207 diff -u -d -r1.206 -r1.207 --- server.c 2001/11/02 01:41:37 1.206 +++ server.c 2001/11/06 23:58:21 1.207 @@ -250,23 +250,23 @@ } -void serv_remove_buddy(struct gaim_connection *g, char *name) +void serv_remove_buddy(struct gaim_connection *g, char *name, char *group) { if (g && g_slist_find(connections, g) && g->prpl && g->prpl->remove_buddy) - g->prpl->remove_buddy(g, name); + g->prpl->remove_buddy(g, name, group); } -void serv_remove_buddies(struct gaim_connection *gc, GList *g) +void serv_remove_buddies(struct gaim_connection *gc, GList *g, char *group) { if (!g_slist_find(connections, gc)) return; if (!gc->prpl) return; /* how the hell did that happen? */ if (gc->prpl->remove_buddies) - gc->prpl->remove_buddies(gc, g); + gc->prpl->remove_buddies(gc, g, group); else { while (g) { - serv_remove_buddy(gc, g->data); + serv_remove_buddy(gc, g->data, group); g = g->next; } } |
From: Eric W. <war...@us...> - 2001-11-06 23:58:54
|
Update of /cvsroot/gaim/gaim In directory usw-pr-cvs1:/tmp/cvs-serv20708 Modified Files: ChangeLog Log Message: don't ask. Index: ChangeLog =================================================================== RCS file: /cvsroot/gaim/gaim/ChangeLog,v retrieving revision 1.351 retrieving revision 1.352 diff -u -d -r1.351 -r1.352 --- ChangeLog 2001/11/01 18:50:39 1.351 +++ ChangeLog 2001/11/06 23:58:20 1.352 @@ -2,6 +2,7 @@ version 0.48: * Right-click on links to open/copy URL + * Yahoo changes version 0.47 (11/01/2001): * Better font loading (pays attention to charset now) |
From: Eric W. <war...@us...> - 2001-11-06 23:58:27
|
Update of /cvsroot/gaim/gaim/src/protocols/zephyr In directory usw-pr-cvs1:/tmp/cvs-serv20708/src/protocols/zephyr Modified Files: zephyr.c Log Message: don't ask. Index: zephyr.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/zephyr/zephyr.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- zephyr.c 2001/10/14 11:36:36 1.14 +++ zephyr.c 2001/11/06 23:58:24 1.15 @@ -670,7 +670,7 @@ } static void zephyr_add_buddy(struct gaim_connection *gc, char *buddy) { } -static void zephyr_remove_buddy(struct gaim_connection *gc, char *buddy) { } +static void zephyr_remove_buddy(struct gaim_connection *gc, char *buddy, char *group) { } static int zephyr_chat_send(struct gaim_connection *gc, int id, char *im) { |
From: Eric W. <war...@us...> - 2001-11-06 23:58:27
|
Update of /cvsroot/gaim/gaim/src/protocols/toc In directory usw-pr-cvs1:/tmp/cvs-serv20708/src/protocols/toc Modified Files: toc.c Log Message: don't ask. Index: toc.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/toc/toc.c,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- toc.c 2001/10/24 10:23:49 1.30 +++ toc.c 2001/11/06 23:58:24 1.31 @@ -1037,7 +1037,7 @@ sflap_send(g, buf, -1, TYPE_DATA); } -static void toc_remove_buddy(struct gaim_connection *g, char *name) +static void toc_remove_buddy(struct gaim_connection *g, char *name, char *group) { char buf[BUF_LEN * 2]; g_snprintf(buf, sizeof(buf), "toc_remove_buddy %s", normalize(name)); @@ -1045,7 +1045,7 @@ toc_set_config(g); } -static void toc_remove_buddies(struct gaim_connection *g, GList *buddies) +static void toc_remove_buddies(struct gaim_connection *g, GList *buddies, char *group) { char buf[BUF_LEN * 2]; int n; |
From: Eric W. <war...@us...> - 2001-11-06 23:58:27
|
Update of /cvsroot/gaim/gaim/src/protocols/yahoo In directory usw-pr-cvs1:/tmp/cvs-serv20708/src/protocols/yahoo Modified Files: .cvsignore Makefile.am Added Files: yahoo.c Removed Files: AUTHORS buddy.c conn.c internal.h login.c misc.c outgoing.c rxhandlers.c yay.c yay.h Log Message: don't ask. --- NEW FILE: yahoo.c --- /* * gaim * * Some code copyright (C) 1998-1999, Mark Spencer <mar...@ma...> * libfaim code copyright 1998, 1999 Adam Fritzler <af...@au...> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA [...1035 lines suppressed...] } void gaim_plugin_remove() { struct prpl *p = find_prpl(PROTO_YAHOO); if (p == my_protocol) unload_protocol(p); } char *name() { return "Yahoo"; } char *description() { return PRPL_DESC("Yahoo"); } #endif Index: .cvsignore =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/yahoo/.cvsignore,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- .cvsignore 2001/07/31 01:00:38 1.1 +++ .cvsignore 2001/11/06 23:58:24 1.2 @@ -10,3 +10,4 @@ outgoing.lo rxhandlers.lo yay.lo +yahoo.lo Index: Makefile.am =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/yahoo/Makefile.am,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Makefile.am 2001/09/21 20:47:37 1.2 +++ Makefile.am 2001/11/06 23:58:24 1.3 @@ -11,8 +11,7 @@ pkg_LTLIBRARIES = noinst_LIBRARIES = libyahoo.a -libyahoo_a_SOURCES = \ - buddy.c conn.c internal.h login.c misc.c outgoing.c rxhandlers.c yay.c yay.h +libyahoo_a_SOURCES = yahoo.c else @@ -20,7 +19,6 @@ pkg_LTLIBRARIES = libyahoo.la noinst_LIBRARIES = -libyahoo_la_SOURCES = \ - buddy.c conn.c internal.h login.c misc.c outgoing.c rxhandlers.c yay.c yay.h +libyahoo_la_SOURCES = yahoo.c endif --- AUTHORS DELETED --- --- buddy.c DELETED --- --- conn.c DELETED --- --- internal.h DELETED --- --- login.c DELETED --- --- misc.c DELETED --- --- outgoing.c DELETED --- --- rxhandlers.c DELETED --- --- yay.c DELETED --- --- yay.h DELETED --- |
From: Eric W. <war...@us...> - 2001-11-06 23:58:27
|
Update of /cvsroot/gaim/gaim/src/protocols/jabber In directory usw-pr-cvs1:/tmp/cvs-serv20708/src/protocols/jabber Modified Files: jabber.c Log Message: don't ask. Index: jabber.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/jabber/jabber.c,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- jabber.c 2001/10/29 11:23:22 1.24 +++ jabber.c 2001/11/06 23:58:23 1.25 @@ -1301,7 +1301,7 @@ g_free(realwho); } -static void jabber_remove_buddy(struct gaim_connection *gc, char *name) +static void jabber_remove_buddy(struct gaim_connection *gc, char *name, char *group) { xmlnode x, y; char *realwho; |
From: Eric W. <war...@us...> - 2001-11-06 23:58:27
|
Update of /cvsroot/gaim/gaim/src/protocols/oscar In directory usw-pr-cvs1:/tmp/cvs-serv20708/src/protocols/oscar Modified Files: oscar.c Log Message: don't ask. Index: oscar.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/oscar.c,v retrieving revision 1.57 retrieving revision 1.58 diff -u -d -r1.57 -r1.58 --- oscar.c 2001/11/06 04:40:21 1.57 +++ oscar.c 2001/11/06 23:58:24 1.58 @@ -2291,7 +2291,7 @@ aim_bos_setbuddylist(odata->sess, odata->conn, buf); } -static void oscar_remove_buddy(struct gaim_connection *g, char *name) { +static void oscar_remove_buddy(struct gaim_connection *g, char *name, char *group) { struct oscar_data *odata = (struct oscar_data *)g->proto_data; aim_remove_buddy(odata->sess, odata->conn, name); } |
From: Eric W. <war...@us...> - 2001-11-06 23:58:27
|
Update of /cvsroot/gaim/gaim/src/protocols/msn In directory usw-pr-cvs1:/tmp/cvs-serv20708/src/protocols/msn Modified Files: msn.c Log Message: don't ask. Index: msn.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/msn/msn.c,v retrieving revision 1.33 retrieving revision 1.34 diff -u -d -r1.33 -r1.34 --- msn.c 2001/11/02 20:55:55 1.33 +++ msn.c 2001/11/06 23:58:23 1.34 @@ -1511,7 +1511,7 @@ } } -static void msn_rem_buddy(struct gaim_connection *gc, char *who) +static void msn_rem_buddy(struct gaim_connection *gc, char *who, char *group) { struct msn_data *md = gc->proto_data; char buf[MSN_BUF_LEN]; |
From: Eric W. <war...@us...> - 2001-11-06 23:58:27
|
Update of /cvsroot/gaim/gaim/src/protocols/napster In directory usw-pr-cvs1:/tmp/cvs-serv20708/src/protocols/napster Modified Files: napster.c Log Message: don't ask. Index: napster.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/napster/napster.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- napster.c 2001/09/28 07:46:36 1.12 +++ napster.c 2001/11/06 23:58:23 1.13 @@ -506,7 +506,7 @@ nap_write_packet(gc, 0xCF, name); } -static void nap_remove_buddy(struct gaim_connection *gc, char *name) +static void nap_remove_buddy(struct gaim_connection *gc, char *name, char *group) { nap_write_packet(gc, 0x12F, name); } |
From: Eric W. <war...@us...> - 2001-11-06 23:58:26
|
Update of /cvsroot/gaim/gaim/src/protocols/irc In directory usw-pr-cvs1:/tmp/cvs-serv20708/src/protocols/irc Modified Files: irc.c Log Message: don't ask. Index: irc.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/irc/irc.c,v retrieving revision 1.53 retrieving revision 1.54 diff -u -d -r1.53 -r1.54 --- irc.c 2001/11/01 08:05:38 1.53 +++ irc.c 2001/11/06 23:58:22 1.54 @@ -1338,7 +1338,8 @@ } /* IRC doesn't have a buddy list, but we can still figure out who's online with ISON */ -static void irc_fake_buddy(struct gaim_connection *gc, char *who) {} +static void irc_add_buddy(struct gaim_connection *gc, char *who) {} +static void irc_remove_buddy(struct gaim_connection *gc, char *who, char *group) {} static GList *irc_chat_info(struct gaim_connection *gc) { @@ -1461,8 +1462,8 @@ ret->login = irc_login; ret->close = irc_close; ret->send_im = irc_send_im; - ret->add_buddy = irc_fake_buddy; - ret->remove_buddy = irc_fake_buddy; + ret->add_buddy = irc_add_buddy; + ret->remove_buddy = irc_remove_buddy; ret->chat_info = irc_chat_info; ret->join_chat = irc_join_chat; ret->chat_leave = irc_chat_leave; |
From: Eric W. <war...@us...> - 2001-11-06 21:30:34
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv25428 Modified Files: sound.c Log Message: no goto!!!! Index: sound.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/sound.c,v retrieving revision 1.42 retrieving revision 1.43 diff -u -d -r1.42 -r1.43 --- sound.c 2001/10/25 02:22:51 1.42 +++ sound.c 2001/11/06 21:30:31 1.43 @@ -247,33 +247,39 @@ int result = 0; int fd = -1; + if (!can_play_artsc()) + return 0; + fd = open(file, O_RDONLY); if (fd < 0) - goto out; - - if (!can_play_artsc()) - goto out; + return 0; - if (fstat(fd, &stat_buf)) - goto out; + if (fstat(fd, &stat_buf)) { + close(fd); + return 0; + } - if (!stat_buf.st_size) - goto out; + if (!stat_buf.st_size) { + close(fd); + return 0; + } buf = g_malloc(stat_buf.st_size); - if (!buf) - goto out; + if (!buf) { + close(fd); + return 0; + } - if (read(fd, buf, stat_buf.st_size) < 0) - goto out; + if (read(fd, buf, stat_buf.st_size) < 0) { + g_free(buf); + close(fd); + return 0; + } result = play_artsc(buf, stat_buf.st_size); - out: - if (buf) - g_free(buf); - if (fd != -1) - close(fd); + g_free(buf); + close(fd); return result; } |
From: Adam F. <mi...@us...> - 2001-11-06 08:40:12
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv20889 Modified Files: dialogs.c Log Message: This is not an advertisement and has nothing to do with who I work for. I promise. Its just about personal taste. Index: dialogs.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/dialogs.c,v retrieving revision 1.280 retrieving revision 1.281 diff -u -d -r1.280 -r1.281 --- dialogs.c 2001/11/02 20:55:55 1.280 +++ dialogs.c 2001/11/06 04:40:21 1.281 @@ -74,6 +74,7 @@ #include "pixmaps/free_icon.xpm" #include "pixmaps/dt_icon.xpm" #include "pixmaps/admin_icon.xpm" +#include "pixmaps/ab.xpm" #define DEFAULT_FONT_NAME "-adobe-helvetica-medium-r-normal--12-120-75-75-p-67-iso8859-1" @@ -1650,6 +1651,8 @@ return dt_icon_xpm; if (!g_strcasecmp(url, "admin_icon.gif")) return admin_icon_xpm; + if (!g_strcasecmp(url, "ab_icon.gif")) + return ab_xpm; return NULL; } |
From: Adam F. <mi...@us...> - 2001-11-06 08:40:10
|
Update of /cvsroot/gaim/gaim/src/protocols/oscar In directory usw-pr-cvs1:/tmp/cvs-serv20889/protocols/oscar Modified Files: oscar.c Log Message: This is not an advertisement and has nothing to do with who I work for. I promise. Its just about personal taste. Index: oscar.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/oscar.c,v retrieving revision 1.56 retrieving revision 1.57 diff -u -d -r1.56 -r1.57 --- oscar.c 2001/11/05 12:25:22 1.56 +++ oscar.c 2001/11/06 04:40:21 1.57 @@ -1545,7 +1545,8 @@ static char *images(int flags) { static char buf[1024]; - g_snprintf(buf, sizeof(buf), "%s%s%s%s", + g_snprintf(buf, sizeof(buf), "%s%s%s%s%s", + (flags & AIM_FLAG_ACTIVEBUDDY) ? "<IMG SRC=\"ab_icon.gif\">" : "", (flags & AIM_FLAG_UNCONFIRMED) ? "<IMG SRC=\"dt_icon.gif\">" : "", (flags & AIM_FLAG_AOL) ? "<IMG SRC=\"aol_icon.gif\">" : "", (flags & AIM_FLAG_ADMINISTRATOR) ? "<IMG SRC=\"admin_icon.gif\">" : "", @@ -2462,10 +2463,10 @@ return icon_offline_xpm; return icon_online_xpm; } - if (uc & UC_AB) - return (char **)ab_xpm; if (uc & UC_UNAVAILABLE) return (char **)away_icon_xpm; + if ((uc & UC_AB) && (uc & UC_NORMAL)) + return (char **)ab_xpm; if (uc & UC_AOL) return (char **)aol_icon_xpm; if (uc & UC_ADMIN) |
From: Eric W. <war...@us...> - 2001-11-05 20:51:16
|
Update of /cvsroot/gaim/gaim/src/protocols/oscar In directory usw-pr-cvs1:/tmp/cvs-serv1699 Modified Files: .cvsignore Log Message: hi. Index: .cvsignore =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/.cvsignore,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- .cvsignore 2001/07/31 01:00:38 1.1 +++ .cvsignore 2001/11/05 20:51:12 1.2 @@ -28,3 +28,7 @@ tlv.lo txqueue.lo util.lo +invite.lo +popups.lo +ssi.lo +translate.lo |
From: Eric W. <war...@us...> - 2001-11-05 20:41:55
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv30848 Modified Files: perl.c Log Message: John Watson pointed this out. Index: perl.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/perl.c,v retrieving revision 1.64 retrieving revision 1.65 diff -u -d -r1.64 -r1.65 --- perl.c 2001/11/02 01:41:37 1.64 +++ perl.c 2001/11/05 20:41:52 1.65 @@ -761,7 +761,7 @@ char *tmp2, *tmp3; tmp2 = g_strdup(escape_quotes(arg2)); tmp3 = arg3 ? g_strdup(escape_quotes(arg3)) : g_malloc0(1); - buf = g_strdup_printf("%lu \"%s\" %s", (unsigned long)arg1, tmp2, tmp3); + buf = g_strdup_printf("'%lu','\"%s\"','%s'", (unsigned long)arg1, tmp2, tmp3); g_free(tmp2); g_free(tmp3); } |
From: Eric W. <war...@us...> - 2001-11-05 15:29:38
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv4432 Modified Files: prefs.c Log Message: bugfix Index: prefs.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/prefs.c,v retrieving revision 1.195 retrieving revision 1.196 diff -u -d -r1.195 -r1.196 --- prefs.c 2001/11/02 01:41:37 1.195 +++ prefs.c 2001/11/05 15:29:34 1.196 @@ -1710,6 +1710,7 @@ { gtk_widget_destroy(prefs_away_list); prefs_away_list = NULL; + prefs_away_menu = NULL; make_away_button = NULL; } |
Update of /cvsroot/gaim/gaim/src/protocols/oscar In directory usw-pr-cvs1:/tmp/cvs-serv20977/protocols/oscar Modified Files: aim.h aim_cbtypes.h aim_internal.h conn.c ft.c login.c misc.c oscar.c rxhandlers.c Log Message: This source code was developed using Microsoft Visual Studio 6.0. Index: aim.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/aim.h,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- aim.h 2001/11/05 08:25:10 1.14 +++ aim.h 2001/11/05 12:25:22 1.15 @@ -565,15 +565,12 @@ faim_export int aim_bos_setbuddylist(aim_session_t *, aim_conn_t *, const char *); faim_export int aim_bos_setprofile(aim_session_t *sess, aim_conn_t *conn, const char *profile, const char *awaymsg, fu16_t caps); faim_export int aim_bos_setgroupperm(aim_session_t *, aim_conn_t *, fu32_t mask); -faim_export int aim_reqrates(aim_session_t *, aim_conn_t *); -faim_export int aim_ratesack(aim_session_t *, aim_conn_t *); faim_export int aim_bos_setprivacyflags(aim_session_t *, aim_conn_t *, fu32_t); faim_export int aim_bos_reqpersonalinfo(aim_session_t *, aim_conn_t *); faim_export int aim_bos_reqservice(aim_session_t *, aim_conn_t *, fu16_t); faim_export int aim_bos_reqrights(aim_session_t *, aim_conn_t *); faim_export int aim_bos_reqbuddyrights(aim_session_t *, aim_conn_t *); faim_export int aim_bos_reqlocaterights(aim_session_t *, aim_conn_t *); -faim_export int aim_setversions(aim_session_t *sess, aim_conn_t *conn); faim_export int aim_setdirectoryinfo(aim_session_t *sess, aim_conn_t *conn, const char *first, const char *middle, const char *last, const char *maiden, const char *nickname, const char *street, const char *city, const char *state, const char *zip, int country, fu16_t privacy); faim_export int aim_setuserinterests(aim_session_t *sess, aim_conn_t *conn, const char *interest1, const char *interest2, const char *interest3, const char *interest4, const char *interest5, fu16_t privacy); faim_export int aim_icq_setstatus(aim_session_t *sess, aim_conn_t *conn, fu16_t status); Index: aim_cbtypes.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/aim_cbtypes.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- aim_cbtypes.h 2001/07/31 01:00:38 1.1 +++ aim_cbtypes.h 2001/11/05 12:25:22 1.2 @@ -223,6 +223,7 @@ #define AIM_CB_SPECIAL_CONNERR 0x0003 #define AIM_CB_SPECIAL_CONNCOMPLETE 0x0004 #define AIM_CB_SPECIAL_FLAPVER 0x0005 +#define AIM_CB_SPECIAL_CONNINITDONE 0x0006 #define AIM_CB_SPECIAL_DEBUGCONN_CONNECT 0xe001 #define AIM_CB_SPECIAL_UNKNOWN 0xffff #define AIM_CB_SPECIAL_DEFAULT AIM_CB_SPECIAL_UNKNOWN Index: aim_internal.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/aim_internal.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- aim_internal.h 2001/11/05 02:05:06 1.5 +++ aim_internal.h 2001/11/05 12:25:22 1.6 @@ -144,6 +144,26 @@ struct snacgroup *next; }; +struct snacpair { + fu16_t group; + fu16_t subtype; + struct snacpair *next; +}; + +struct rateclass { + fu16_t classid; + fu32_t windowsize; + fu32_t clear; + fu32_t alert; + fu32_t limit; + fu32_t disconnect; + fu32_t current; + fu32_t max; + fu8_t unknown[5]; /* only present in versions >= 3 */ + struct snacpair *members; + struct rateclass *next; +}; + /* * This is inside every connection. But it is a void * to anything * outside of libfaim. It should remain that way. It's called data @@ -153,6 +173,7 @@ */ typedef struct aim_conn_inside_s { struct snacgroup *groups; + struct rateclass *rates; } aim_conn_inside_t; faim_internal void aim_conn_addgroup(aim_conn_t *conn, fu16_t group); @@ -178,6 +199,10 @@ faim_internal void aim_conn_close_rend(aim_session_t *sess, aim_conn_t *conn); faim_internal void aim_conn_kill_rend(aim_session_t *sess, aim_conn_t *conn); +/* These are all handled internally now. */ +faim_internal int aim_setversions(aim_session_t *sess, aim_conn_t *conn); +faim_internal int aim_reqrates(aim_session_t *, aim_conn_t *); +faim_internal int aim_ratesack(aim_session_t *, aim_conn_t *); #ifndef FAIM_INTERNAL_INSANE #define printf() printf called inside libfaim Index: conn.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/conn.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- conn.c 2001/11/05 02:05:06 1.5 +++ conn.c 2001/11/05 12:25:22 1.6 @@ -104,10 +104,11 @@ return NULL; } -static struct snacgroup *connkill_snacgroups(struct snacgroup *sg) +static void connkill_snacgroups(struct snacgroup **head) { + struct snacgroup *sg; - while (sg) { + for (sg = *head; sg; ) { struct snacgroup *tmp; tmp = sg->next; @@ -115,9 +116,28 @@ sg = tmp; } - return NULL; + *head = NULL; + + return; } +static void connkill_rates(struct rateclass **head) +{ + struct rateclass *rc; + + for (rc = *head; rc; ) { + struct rateclass *tmp; + + tmp = rc->next; + free(rc); + rc = tmp; + } + + *head = NULL; + + return; +} + static void connkill_real(aim_session_t *sess, aim_conn_t **deadconn) { @@ -144,7 +164,8 @@ if ((*deadconn)->inside) { aim_conn_inside_t *inside = (aim_conn_inside_t *)(*deadconn)->inside; - inside->groups = connkill_snacgroups(inside->groups); + connkill_snacgroups(&inside->groups); + connkill_rates(&inside->rates); free(inside); } Index: ft.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/ft.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- ft.c 2001/11/05 08:25:10 1.5 +++ ft.c 2001/11/05 12:25:22 1.6 @@ -28,9 +28,6 @@ }; static int listenestablish(fu16_t portnum); -#if 0 -static struct aim_fileheader_t *aim_oft_getfh(unsigned char *hdr); -#endif /** * aim_handlerendconnect - call this to accept OFT connections and set up the required structures Index: login.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/login.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- login.c 2001/11/05 02:05:06 1.9 +++ login.c 2001/11/05 12:25:22 1.10 @@ -448,14 +448,18 @@ * * This info probably doesn't even need to make it to the client. * + * We don't actually call the client here. This starts off the connection + * initialization routine required by all AIM connections. The next time + * the client is called is the CONNINITDONE callback, which should be + * shortly after the rate information is acknowledged. + * */ static int hostonline(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_bstream_t *bs) { - aim_rxcallback_t userfunc; - int ret = 0; fu16_t *families; int famcount; + if (!(families = malloc(aim_bstream_empty(bs)))) return 0; @@ -464,12 +468,20 @@ aim_conn_addgroup(rx->conn, families[famcount]); } - if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype))) - ret = userfunc(sess, rx, famcount, families); - free(families); - return ret; + + /* + * Next step is in the Host Versions handler. + * + * Note that we must send this before we request rates, since + * the format of the rate information depends on the versions we + * give it. + * + */ + aim_setversions(sess, rx->conn); + + return 1; } static int redirect(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_bstream_t *bs) @@ -518,6 +530,40 @@ return ret; } +/* + * Request Rate Information. + * + */ +faim_internal int aim_reqrates(aim_session_t *sess, aim_conn_t *conn) +{ + return aim_genericreq_n(sess, conn, 0x0001, 0x0006); +} + +/* + * Rate Information Response Acknowledge. + * + */ +faim_internal int aim_ratesack(aim_session_t *sess, aim_conn_t *conn) +{ + aim_conn_inside_t *ins = (aim_conn_inside_t *)conn->inside; + aim_frame_t *fr; + aim_snacid_t snacid; + struct rateclass *rc; + + if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 512))) + return -ENOMEM; + + snacid = aim_cachesnac(sess, 0x0001, 0x0008, 0x0000, NULL, 0); + aim_putsnac(&fr->data, 0x0001, 0x0008, 0x0000, snacid); + + for (rc = ins->rates; rc; rc = rc->next) + aimbs_put16(&fr->data, rc->classid); + + aim_tx_enqueue(sess, fr); + + return 0; +} + /* * The Rate Limiting System, An Abridged Guide to Nonsense. * @@ -568,15 +614,144 @@ * */ -/* XXX parse this */ +static void rc_addclass(struct rateclass **head, struct rateclass *inrc) +{ + struct rateclass *rc, *rc2; + + if (!(rc = malloc(sizeof(struct rateclass)))) + return; + + memcpy(rc, inrc, sizeof(struct rateclass)); + rc->next = NULL; + + for (rc2 = *head; rc2 && rc2->next; rc2 = rc2->next) + ; + + if (!rc2) + *head = rc; + else + rc2->next = rc; + + return; +} + +static struct rateclass *rc_findclass(struct rateclass **head, fu16_t id) +{ + struct rateclass *rc; + + for (rc = *head; rc; rc = rc->next) { + if (rc->classid == id) + return rc; + } + + return NULL; +} + +static void rc_addpair(struct rateclass *rc, fu16_t group, fu16_t type) +{ + struct snacpair *sp, *sp2; + + if (!(sp = malloc(sizeof(struct snacpair)))) + return; + memset(sp, 0, sizeof(struct snacpair)); + + sp->group = group; + sp->subtype = type; + sp->next = NULL; + + for (sp2 = rc->members; sp2 && sp2->next; sp2 = sp2->next) + ; + + if (!sp2) + rc->members = sp; + else + sp2->next = sp; + + return; +} + static int rateresp(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_bstream_t *bs) { + aim_conn_inside_t *ins = (aim_conn_inside_t *)rx->conn->inside; + fu16_t numclasses, i; aim_rxcallback_t userfunc; - if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype))) - return userfunc(sess, rx); - return 0; + /* + * First are the parameters for each rate class. + */ + numclasses = aimbs_get16(bs); + for (i = 0; i < numclasses; i++) { + struct rateclass rc; + + memset(&rc, 0, sizeof(struct rateclass)); + + rc.classid = aimbs_get16(bs); + rc.windowsize = aimbs_get32(bs); + rc.clear = aimbs_get32(bs); + rc.alert = aimbs_get32(bs); + rc.limit = aimbs_get32(bs); + rc.disconnect = aimbs_get32(bs); + rc.current = aimbs_get32(bs); + rc.max = aimbs_get32(bs); + + /* + * The server will send an extra five bytes of parameters + * depending on the version we advertised in 1/17. If we + * didn't send 1/17 (evil!), then this will crash and you + * die, as it will default to the old version but we have + * the new version hardcoded here. + */ + if (mod->version >= 3) + aimbs_getrawbuf(bs, rc.unknown, sizeof(rc.unknown)); + + rc_addclass(&ins->rates, &rc); + } + + /* + * Then the members of each class. + */ + for (i = 0; i < numclasses; i++) { + fu16_t classid, count; + struct rateclass *rc; + int j; + + classid = aimbs_get16(bs); + count = aimbs_get16(bs); + + rc = rc_findclass(&ins->rates, classid); + + for (j = 0; j < count; j++) { + fu16_t group, subtype; + + group = aimbs_get16(bs); + subtype = aimbs_get16(bs); + + if (rc) + rc_addpair(rc, group, subtype); + } + } + + /* + * We don't pass the rate information up to the client, as it really + * doesn't care. The information is stored in the connection, however + * so that we can do more fun stuff later (not really). + */ + + /* + * Last step in the conn init procedure is to acknowledge that we + * agree to these draconian limitations. + */ + aim_ratesack(sess, rx->conn); + + /* + * Finally, tell the client it's ready to go... + */ + if ((userfunc = aim_callhandler(sess, rx->conn, AIM_CB_FAM_SPECIAL, AIM_CB_SPECIAL_CONNINITDONE))) + userfunc(sess, rx); + + + return 1; } static int ratechange(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_bstream_t *bs) @@ -780,22 +955,57 @@ return ret; } +faim_internal int aim_setversions(aim_session_t *sess, aim_conn_t *conn) +{ + aim_conn_inside_t *ins = (aim_conn_inside_t *)conn->inside; + struct snacgroup *sg; + aim_frame_t *fr; + aim_snacid_t snacid; + + if (!ins) + return -EINVAL; + + if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 1152))) + return -ENOMEM; + + snacid = aim_cachesnac(sess, 0x0001, 0x0017, 0x0000, NULL, 0); + aim_putsnac(&fr->data, 0x0001, 0x0017, 0x0000, snacid); + + /* + * Send only the versions that the server cares about (that it + * marked as supporting in the server ready SNAC). + */ + for (sg = ins->groups; sg; sg = sg->next) { + aim_module_t *mod; + + if ((mod = aim__findmodulebygroup(sess, sg->group))) { + aimbs_put16(&fr->data, mod->family); + aimbs_put16(&fr->data, mod->version); + } else + faimdprintf(sess, 1, "aim_setversions: server supports group 0x%04x but we don't!\n", sg->group); + } + + aim_tx_enqueue(sess, fr); + + return 0; +} + static int hostversions(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_bstream_t *bs) { - aim_rxcallback_t userfunc; int vercount; fu8_t *versions; - int ret = 0; + /* This is frivolous. (Thank you SmarterChild.) */ vercount = aim_bstream_empty(bs)/4; versions = aimbs_getraw(bs, aim_bstream_empty(bs)); - - if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype))) - ret = userfunc(sess, rx, vercount, versions); - free(versions); - return ret; + /* + * Now request rates. + */ + aim_reqrates(sess, rx->conn); + + return 1; } /* Index: misc.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/misc.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- misc.c 2001/11/05 02:05:06 1.7 +++ misc.c 2001/11/05 12:25:22 1.8 @@ -253,43 +253,6 @@ } /* - * Request Rate Information. - * - */ -faim_export int aim_reqrates(aim_session_t *sess, aim_conn_t *conn) -{ - return aim_genericreq_n(sess, conn, 0x0001, 0x0006); -} - -/* - * Rate Information Response Acknowledge. - * - */ -faim_export int aim_ratesack(aim_session_t *sess, aim_conn_t *conn) -{ - aim_frame_t *fr; - aim_snacid_t snacid; - - if(!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 10+10))) - return -ENOMEM; - - snacid = aim_cachesnac(sess, 0x0001, 0x0008, 0x0000, NULL, 0); - - aim_putsnac(&fr->data, 0x0001, 0x0008, 0x0000, snacid); - - /* XXX store the rate info in the inside struct, make this dynamic */ - aimbs_put16(&fr->data, 0x0001); - aimbs_put16(&fr->data, 0x0002); - aimbs_put16(&fr->data, 0x0003); - aimbs_put16(&fr->data, 0x0004); - aimbs_put16(&fr->data, 0x0005); - - aim_tx_enqueue(sess, fr); - - return 0; -} - -/* * aim_bos_setprivacyflags() * * Sets privacy flags. Normally 0x03. @@ -311,42 +274,6 @@ { return aim_genericreq_n(sess, conn, 0x0001, 0x000e); } - -faim_export int aim_setversions(aim_session_t *sess, aim_conn_t *conn) -{ - aim_conn_inside_t *ins = (aim_conn_inside_t *)conn->inside; - struct snacgroup *sg; - aim_frame_t *fr; - aim_snacid_t snacid; - - if (!ins) - return -EINVAL; - - if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 1152))) - return -ENOMEM; - - snacid = aim_cachesnac(sess, 0x0001, 0x0017, 0x0000, NULL, 0); - aim_putsnac(&fr->data, 0x0001, 0x0017, 0x0000, snacid); - - /* - * Send only the versions that the server cares about (that it - * marked as supporting in the server ready SNAC). - */ - for (sg = ins->groups; sg; sg = sg->next) { - aim_module_t *mod; - - if ((mod = aim__findmodulebygroup(sess, sg->group))) { - aimbs_put16(&fr->data, mod->family); - aimbs_put16(&fr->data, mod->version); - } else - faimdprintf(sess, 1, "aim_setversions: server supports group 0x%04x but we don't!\n", sg->group); - } - - aim_tx_enqueue(sess, fr); - - return 0; -} - /* * aim_bos_reqservice(serviceid) Index: oscar.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/oscar.c,v retrieving revision 1.55 retrieving revision 1.56 diff -u -d -r1.55 -r1.56 --- oscar.c 2001/11/05 11:33:50 1.55 +++ oscar.c 2001/11/05 12:25:22 1.56 @@ -229,15 +229,16 @@ static int gaim_parse_searcherror(aim_session_t *, aim_frame_t *, ...); static int gaim_parse_searchreply(aim_session_t *, aim_frame_t *, ...); static int gaim_bosrights (aim_session_t *, aim_frame_t *, ...); -static int rateresp_bos (aim_session_t *, aim_frame_t *, ...); -static int rateresp_auth (aim_session_t *, aim_frame_t *, ...); +static int conninitdone_bos (aim_session_t *sess, aim_frame_t *fr, ...); +static int conninitdone_admin (aim_session_t *sess, aim_frame_t *fr, ...); +static int conninitdone_chat (aim_session_t *sess, aim_frame_t *fr, ...); +static int conninitdone_chatnav (aim_session_t *sess, aim_frame_t *fr, ...); static int gaim_parse_msgerr (aim_session_t *, aim_frame_t *, ...); static int gaim_parse_buddyrights(aim_session_t *, aim_frame_t *, ...); static int gaim_parse_locerr (aim_session_t *, aim_frame_t *, ...); static int gaim_icbm_param_info (aim_session_t *, aim_frame_t *, ...); static int gaim_parse_genericerr (aim_session_t *, aim_frame_t *, ...); static int gaim_memrequest (aim_session_t *, aim_frame_t*, ...); -static int server_ready_bos (aim_session_t *, aim_frame_t*, ...); static int gaim_selfinfo (aim_session_t *, aim_frame_t*, ...); static int gaim_directim_initiate (aim_session_t *, aim_frame_t *, ...); @@ -649,11 +650,9 @@ return 0; } + aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_SPECIAL, AIM_CB_SPECIAL_CONNINITDONE, conninitdone_bos, 0); aim_conn_addhandler(sess, bosconn, 0x0009, 0x0003, gaim_bosrights, 0); - aim_conn_addhandler(sess, bosconn, 0x0001, 0x0007, rateresp_bos, 0); /* rate info */ aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_ACK, AIM_CB_ACK_ACK, NULL, 0); - aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_GEN, AIM_CB_GEN_SERVERREADY, server_ready_bos, 0); - aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_GEN, AIM_CB_GEN_RATEINFO, NULL, 0); aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_GEN, AIM_CB_GEN_REDIRECT, gaim_handle_redirect, 0); aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_BUD, AIM_CB_BUD_RIGHTSINFO, gaim_parse_buddyrights, 0); aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_BUD, AIM_CB_BUD_ONCOMING, gaim_parse_oncoming, 0); @@ -857,66 +856,32 @@ return 1; } -static int server_ready_auth(aim_session_t *sess, aim_frame_t *fr, ...) { - - aim_setversions(sess, fr->conn); - aim_reqrates(sess, fr->conn); - debug_printf("done with AUTH ServerReady\n"); - - return 1; -} - -static int server_ready_bos(aim_session_t *sess, aim_frame_t *fr, ...) { - aim_setversions(sess, fr->conn); - aim_reqrates(sess, fr->conn); /* request rate info */ - debug_printf("done with BOS ServerReady\n"); - - return 1; -} - -static int rateresp_chat(aim_session_t *sess, aim_frame_t *fr, ...) { +static int conninitdone_chat(aim_session_t *sess, aim_frame_t *fr, ...) { struct gaim_connection *gc = sess->aux_data; struct chat_connection *chatcon; static int id = 1; - aim_ratesack(sess, fr->conn); + aim_conn_addhandler(sess, fr->conn, AIM_CB_FAM_CHT, AIM_CB_CHT_USERJOIN, gaim_chat_join, 0); + aim_conn_addhandler(sess, fr->conn, AIM_CB_FAM_CHT, AIM_CB_CHT_USERLEAVE, gaim_chat_leave, 0); + aim_conn_addhandler(sess, fr->conn, AIM_CB_FAM_CHT, AIM_CB_CHT_ROOMINFOUPDATE, gaim_chat_info_update, 0); + aim_conn_addhandler(sess, fr->conn, AIM_CB_FAM_CHT, AIM_CB_CHT_INCOMINGMSG, gaim_chat_incoming_msg, 0); + aim_clientready(sess, fr->conn); + chatcon = find_oscar_chat_by_conn(gc, fr->conn); chatcon->id = id; chatcon->cnv = serv_got_joined_chat(gc, id++, chatcon->show); return 1; } - -static int rateresp_chatnav(aim_session_t *sess, aim_frame_t *fr, ...) { - aim_ratesack(sess, fr->conn); - aim_clientready(sess, fr->conn); - aim_chatnav_reqrights(sess, fr->conn); - - return 1; -} +static int conninitdone_chatnav(aim_session_t *sess, aim_frame_t *fr, ...) { -static int server_ready_chatnav(aim_session_t *sess, aim_frame_t *fr, ...) { - debug_printf("chatnav: got server ready\n"); - aim_conn_addhandler(sess, fr->conn, 0x0001, 0x0007, rateresp_chatnav, 0); aim_conn_addhandler(sess, fr->conn, AIM_CB_FAM_CTN, AIM_CB_CTN_INFO, gaim_chatnav_info, 0); - aim_setversions(sess, fr->conn); - aim_reqrates(sess, fr->conn); - return 1; -} - -static int server_ready_chat(aim_session_t *sess, aim_frame_t *fr, ...) { + aim_clientready(sess, fr->conn); - debug_printf("chat: got server ready\n"); - aim_conn_addhandler(sess, fr->conn, 0x0001, 0x0007, rateresp_chat, 0); - aim_conn_addhandler(sess, fr->conn, AIM_CB_FAM_CHT, AIM_CB_CHT_USERJOIN, gaim_chat_join, 0); - aim_conn_addhandler(sess, fr->conn, AIM_CB_FAM_CHT, AIM_CB_CHT_USERLEAVE, gaim_chat_leave, 0); - aim_conn_addhandler(sess, fr->conn, AIM_CB_FAM_CHT, AIM_CB_CHT_ROOMINFOUPDATE, gaim_chat_info_update, 0); - aim_conn_addhandler(sess, fr->conn, AIM_CB_FAM_CHT, AIM_CB_CHT_INCOMINGMSG, gaim_chat_incoming_msg, 0); - aim_setversions(sess, fr->conn); - aim_reqrates(sess, fr->conn); + aim_chatnav_reqrights(sess, fr->conn); return 1; } @@ -1050,8 +1015,7 @@ g_free(host); return 1; } - aim_conn_addhandler(sess, tstconn, 0x0001, 0x0003, server_ready_auth, 0); - aim_conn_addhandler(sess, tstconn, 0x0001, 0x0007, rateresp_auth, 0); + aim_conn_addhandler(sess, tstconn, AIM_CB_FAM_SPECIAL, AIM_CB_SPECIAL_CONNINITDONE, conninitdone_admin, 0); aim_conn_addhandler(sess, tstconn, 0x0007, 0x0003, gaim_info_change, 0); aim_conn_addhandler(sess, tstconn, 0x0007, 0x0005, gaim_info_change, 0); aim_conn_addhandler(sess, tstconn, 0x0007, 0x0007, gaim_account_confirm, 0); @@ -1073,7 +1037,7 @@ g_free(host); return 1; } - aim_conn_addhandler(sess, tstconn, 0x0001, 0x0003, server_ready_chatnav, 0); + aim_conn_addhandler(sess, tstconn, AIM_CB_FAM_SPECIAL, AIM_CB_SPECIAL_CONNINITDONE, conninitdone_chatnav, 0); tstconn->status |= AIM_CONN_STATUS_INPROGRESS; tstconn->fd = proxy_connect(host, port, oscar_chatnav_connect, gc); @@ -1101,7 +1065,8 @@ return 1; } - aim_conn_addhandler(sess, tstconn, 0x0001, 0x0003, server_ready_chat, 0); + aim_conn_addhandler(sess, tstconn, AIM_CB_FAM_SPECIAL, AIM_CB_SPECIAL_CONNINITDONE, conninitdone_chat, 0); + ccon = g_new0(struct chat_connection, 1); ccon->conn = tstconn; ccon->gc = gc; @@ -1934,10 +1899,9 @@ return 1; } -static int rateresp_bos(aim_session_t *sess, aim_frame_t *fr, ...) { +static int conninitdone_bos(aim_session_t *sess, aim_frame_t *fr, ...) { struct gaim_connection *gc = sess->aux_data; - aim_ratesack(sess, fr->conn); aim_bos_reqpersonalinfo(sess, fr->conn); aim_bos_reqlocaterights(sess, fr->conn); aim_bos_setprofile(sess, fr->conn, gc->user->user_info, NULL, gaim_caps); @@ -1961,13 +1925,12 @@ return 1; } -static int rateresp_auth(aim_session_t *sess, aim_frame_t *fr, ...) { +static int conninitdone_admin(aim_session_t *sess, aim_frame_t *fr, ...) { struct gaim_connection *gc = sess->aux_data; struct oscar_data *od = gc->proto_data; - aim_ratesack(sess, fr->conn); aim_clientready(sess, fr->conn); - debug_printf("connected to auth (admin)\n"); + debug_printf("connected to admin\n"); if (od->chpass) { debug_printf("changing password\n"); Index: rxhandlers.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/rxhandlers.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- rxhandlers.c 2001/11/05 02:05:06 1.3 +++ rxhandlers.c 2001/11/05 12:25:22 1.4 @@ -370,6 +370,34 @@ return 1; } +/* + * Some SNACs we do not allow to be hooked, for good reason. + */ +static int checkdisallowed(fu16_t group, fu16_t type) +{ + static const struct { + fu16_t group; + fu16_t type; + } dontuse[] = { + {0x0001, 0x0002}, + {0x0001, 0x0003}, + {0x0001, 0x0006}, + {0x0001, 0x0007}, + {0x0001, 0x0008}, + {0x0001, 0x0017}, + {0x0001, 0x0018}, + {0x0000, 0x0000} + }; + int i; + + for (i = 0; dontuse[i].group != 0x0000; i++) { + if ((dontuse[i].group == group) && (dontuse[i].type == type)) + return 1; + } + + return 0; +} + faim_export int aim_conn_addhandler(aim_session_t *sess, aim_conn_t *conn, fu16_t family, fu16_t type, aim_rxcallback_t newhandler, fu16_t flags) { struct aim_rxcblist_s *newcb; @@ -378,6 +406,11 @@ return -1; faimdprintf(sess, 1, "aim_conn_addhandler: adding for %04x/%04x\n", family, type); + + if (checkdisallowed(family, type)) { + faimdprintf(sess, 0, "aim_conn_addhandler: client tried to hook %x/%x -- BUG!!!\n", family, type); + return -1; + } if (!(newcb = (struct aim_rxcblist_s *)calloc(1, sizeof(struct aim_rxcblist_s)))) return -1; |