From: Luke S. <lsc...@us...> - 2004-09-08 11:34:02
|
Update of /cvsroot/gaim/gaim/src/protocols/msn In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4255/src/protocols/msn Modified Files: Tag: oldstatus Makefile.am Makefile.mingw msn.c notification.c session.c session.h switchboard.c sync.c user.c userlist.c Added Files: Tag: oldstatus dialog.c dialog.h Log Message: this patch from shx handles buddy list sync issues on msn. the 2 new files do not have gtk in them, they use the request api. --- NEW FILE: dialog.c --- /** * @file dialog.c Dialog functions * * gaim * * Gaim is the legal property of its developers, whose names are too numerous * to list here. Please refer to the COPYRIGHT file distributed with this * source distribution. * * 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 */ #include "msn.h" typedef struct { GaimConnection *gc; char *who; char *group; gboolean add; } MsnAddRemData; static void msn_add_cb(MsnAddRemData *data) { if (g_list_find(gaim_connections_get_all(), data->gc) != NULL) { MsnSession *session = data->gc->proto_data; MsnUserList *userlist = session->userlist; msn_userlist_add_buddy(userlist, data->who, MSN_LIST_FL, data->group); } if (data->group != NULL) g_free(data->group); g_free(data->who); g_free(data); } static void msn_rem_cb(MsnAddRemData *data) { if (g_list_find(gaim_connections_get_all(), data->gc) != NULL) { MsnSession *session = data->gc->proto_data; MsnUserList *userlist = session->userlist; msn_userlist_rem_buddy(userlist, data->who, MSN_LIST_FL, data->group); } if (data->group != NULL) g_free(data->group); g_free(data->who); g_free(data); } void msn_show_sync_issue(MsnSession *session, const char *passport, const char *group_name) { GaimConnection *gc; GaimAccount *account; MsnAddRemData *data; char *msg, *reason; GaimBuddy *buddy; GaimGroup *group = NULL; account = session->account; gc = gaim_account_get_connection(account); data = g_new0(MsnAddRemData, 1); data->who = g_strdup(passport); data->group = g_strdup(group_name); data->gc = gc; msg = g_strdup_printf(_("Buddy list syncronization issue in %s (%s)"), gaim_account_get_username(account), gaim_account_get_protocol_name(account)); if (group_name != NULL) { reason = g_strdup_printf(_("%s on the local list is " "inside the group \"%s\" but not on " "the server list. " "Do you want this buddy to be added?"), passport, group_name); } else { reason = g_strdup_printf(_("%s is on the local list but " "not on the server list. " "Do you want this buddy to be added?"), passport); } gaim_request_action(gc, NULL, msg, reason, 0, data, 2, _("Yes"), G_CALLBACK(msn_add_cb), _("No"), G_CALLBACK(msn_rem_cb)); if (group_name != NULL) group = gaim_find_group(group_name); if (group != NULL) buddy = gaim_find_buddy_in_group(account, passport, group); else buddy = gaim_find_buddy(account, passport); if (buddy != NULL) gaim_blist_remove_buddy(buddy); g_free(reason); g_free(msg); } --- NEW FILE: dialog.h --- /** * @file dialog.h Dialog functions * * gaim * * Gaim is the legal property of its developers, whose names are too numerous * to list here. Please refer to the COPYRIGHT file distributed with this * source distribution. * * 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 */ #ifndef _MSN_DIALOG_H_ #define _MSN_DIALOG_H_ void msn_show_sync_issue(MsnSession *session, const char *passport, const char *group_name); #endif /* _MSN_DIALOG_H_ */ Index: Makefile.am =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/msn/Makefile.am,v retrieving revision 1.29 retrieving revision 1.29.2.1 diff -u -d -p -r1.29 -r1.29.2.1 --- Makefile.am 6 Jun 2004 03:45:22 -0000 1.29 +++ Makefile.am 8 Sep 2004 11:33:50 -0000 1.29.2.1 @@ -8,6 +8,8 @@ MSNSOURCES = \ cmdproc.h \ command.c \ command.h \ + dialog.c \ + dialog.h \ directconn.c \ directconn.h \ error.c \ Index: Makefile.mingw =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/msn/Makefile.mingw,v retrieving revision 1.17 retrieving revision 1.17.2.1 diff -u -d -p -r1.17 -r1.17.2.1 --- Makefile.mingw 6 Jun 2004 04:12:30 -0000 1.17 +++ Makefile.mingw 8 Sep 2004 11:33:50 -0000 1.17.2.1 @@ -70,6 +70,7 @@ LIB_PATHS = -L$(GTK_TOP)/lib \ C_SRC = cmdproc.c \ command.c \ + dialog.c \ directconn.c \ error.c \ group.c \ Index: msn.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/msn/msn.c,v retrieving revision 1.320.2.1 retrieving revision 1.320.2.2 diff -u -d -p -r1.320.2.1 -r1.320.2.2 --- msn.c 3 Sep 2004 21:34:19 -0000 1.320.2.1 +++ msn.c 8 Sep 2004 11:33:50 -0000 1.320.2.2 @@ -430,15 +430,24 @@ msn_status_text(GaimBuddy *b) static char * msn_tooltip_text(GaimBuddy *b) { - char *text = NULL; + GString *s; + MsnUser *user; + + s = g_string_new(""); if (GAIM_BUDDY_IS_ONLINE(b)) { - text = g_strdup_printf(_("\n<b>%s:</b> %s"), _("Status"), + g_string_append_printf(s, _("\n<b>%s:</b> %s"), _("Status"), msn_away_get_text(MSN_AWAY_TYPE(b->uc))); } - return text; + user = b->proto_data; + + g_string_append_printf(s, _("\n<b>%s:</b> %s"), _("Has you"), + (user->list_op & (1 << MSN_LIST_RL)) ? + "yes" : "no" ); + + return g_string_free(s, FALSE); } static GList * @@ -570,7 +579,7 @@ msn_login(GaimAccount *account) gaim_debug_info("msn", "using http method\n"); host = "gateway.messenger.hotmail.com"; - port = 80; + port = 80; } else { @@ -776,6 +785,54 @@ msn_set_idle(GaimConnection *gc, int idl } static void +fake_userlist_add_buddy(MsnUserList *userlist, + const char *who, int list_id, + const char *group_name) +{ + MsnUser *user; + static int group_id_c = 1; + int group_id; + + group_id = -1; + + if (group_name != NULL) + { + MsnGroup *group; + group = msn_group_new(userlist, group_id_c, group_name); + group_id = group_id_c++; + } + + user = msn_userlist_find_user(userlist, who); + + if (user == NULL) + { + user = msn_user_new(userlist, who, NULL); + msn_userlist_add_user(userlist, user); + } + else + if (user->list_op & (1 << list_id)) + { + if (list_id == MSN_LIST_FL) + { + if (group_id >= 0) + if (g_list_find(user->group_ids, + GINT_TO_POINTER(group_id))) + return; + } + else + return; + } + + if (group_id >= 0) + { + user->group_ids = g_list_append(user->group_ids, + GINT_TO_POINTER(group_id)); + } + + user->list_op |= (1 << list_id); +} + +static void msn_add_buddy(GaimConnection *gc, GaimBuddy *buddy, GaimGroup *group) { MsnSession *session; @@ -787,12 +844,19 @@ msn_add_buddy(GaimConnection *gc, GaimBu who = msn_normalize(gc->account, buddy->name); if (!session->logged_in) + { + fake_userlist_add_buddy(session->sync_userlist, who, MSN_LIST_FL, + group ? group->name : NULL); + return; + } +#if 0 if (group != NULL && group->name != NULL) gaim_debug_info("msn", "msn_add_buddy: %s, %s\n", who, group->name); else gaim_debug_info("msn", "msn_add_buddy: %s\n", who); +#endif #if 0 /* Which is the max? */ @@ -805,7 +869,9 @@ msn_add_buddy(GaimConnection *gc, GaimBu } #endif - /* XXX - Would group ever be NULL here? I don't think so... */ + /* XXX - Would group ever be NULL here? I don't think so... + * shx: Yes it should; MSN handles non-grouped buddies, and this is only + * internal. */ msn_userlist_add_buddy(userlist, who, MSN_LIST_FL, group ? group->name : NULL); } @@ -1122,50 +1188,78 @@ msn_remove_group(GaimConnection *gc, Gai } static char * -msn_tooltip_info_text(MsnGetInfoData *info_data) { - GString *s = g_string_sized_new(80); /* wild guess */ +msn_tooltip_info_text(MsnGetInfoData *info_data) +{ + GString *s; GString *name; GaimBuddy *b; const char *p; + s = g_string_sized_new(80); /* wild guess */ + /* Try to not display the MSN screen name as an email address */ p = strrchr(info_data->name, '@'); - if (p) { + + if (p) + { name = g_string_new_len(info_data->name, p - info_data->name); g_string_append_printf(name, "@%s", p + 1); - } else { /* This should never happen */ + } + else + { + /* This should never happen */ name = g_string_new(info_data->name); } + g_string_printf(s, "<span style=\"font-size: larger\"><b>%s</b></span><br>", - name->str); + name->str); g_string_free(name, TRUE); b = gaim_find_buddy(gaim_connection_get_account(info_data->gc), - info_data->name); + info_data->name); - if (b) { + if (b) + { + MsnUser *user; char *statustext = msn_tooltip_text(b); - if(b->alias && b->alias[0]) { + + if (b->alias && b->alias[0]) + { char *aliastext = g_markup_escape_text(b->alias, -1); + g_string_append_printf(s, _("<b>Alias:</b> %s<br>"), aliastext); g_free(aliastext); } - if(b->server_alias) { + + if (b->server_alias) + { char *nicktext = g_markup_escape_text(b->server_alias, -1); + g_string_append_printf(s, _("<b>%s:</b> "), _("Nickname")); g_string_append_printf(s, "<font sml=\"msn\">%s</font><br>", - nicktext); + nicktext); g_free(nicktext); } - if (b->idle > 0) { + + if (b->idle > 0) + { char *idletime = gaim_str_seconds_to_string(time(NULL) - b->idle); + g_string_append_printf(s, _("<b>%s:</b> %s<br>"), _("Idle"), - idletime); + idletime); g_free(idletime); } - if (statustext) { + + if (statustext) + { g_string_append_printf(s, "%s<br>", statustext); g_free(statustext); } + + user = b->proto_data; + + g_string_append_printf(s, _("<b>%s:</b> %s<br>"), _("Has you"), + (user->list_op & (1 << MSN_LIST_RL)) ? + "yes" : "no" ); } return g_string_free(s, FALSE); @@ -1173,25 +1267,32 @@ msn_tooltip_info_text(MsnGetInfoData *in #if PHOTO_SUPPORT -static char *msn_get_photo_url(const char *url_text) { +static char * +msn_get_photo_url(const char *url_text) +{ char *p; char *it = NULL; p = strstr(url_text, " title=\"Click to see the full-size photo.\">"); - if (p) { + if (p) + { /* Search backwards for "http://". This is stupid, but it works. */ - for (; !it && p > url_text; p -= 1) { - if (strncmp(p, "\"http://", 8) == 0) { + for (; !it && p > url_text; p -= 1) + { + if (strncmp(p, "\"http://", 8) == 0) + { char *q; p += 1; /* skip only the " */ q = strchr(p, '"'); - if (q) { + if (q) + { it = g_strndup(p, q - p); } } } } + return it; } @@ -1513,16 +1614,20 @@ msn_got_info(void *data, const char *url info2_data->title = title; /* Try to put the photo in there too, if there's one */ - if (photo_url_text) { + if (photo_url_text) + { gaim_url_fetch(photo_url_text, FALSE, NULL, FALSE, msn_got_photo, - info2_data); - } else { + info2_data); + } + else + { /* Emulate a callback */ msn_got_photo(info2_data, NULL, 0); } } -static void msn_got_photo(void *data, const char *url_text, size_t len) +static void +msn_got_photo(void *data, const char *url_text, size_t len) { MsnGetInfoStepTwoData *info2_data = (MsnGetInfoStepTwoData *)data; int id = -1; @@ -1537,14 +1642,18 @@ static void msn_got_photo(void *data, co const char *title = info2_data->title; /* Try to put the photo in there too, if there's one and is readable */ - if (data && url_text && len != 0) { + if (data && url_text && len != 0) + { if (strstr(url_text, "400 Bad Request") - || strstr(url_text, "403 Forbidden") - || strstr(url_text, "404 Not Found")) { + || strstr(url_text, "403 Forbidden") + || strstr(url_text, "404 Not Found")) + { gaim_debug_info("msn", "Error getting %s: %s\n", photo_url_text, url_text); - } else { + } + else + { char buf[1024]; gaim_debug_info("msn", "%s is %d bytes\n", photo_url_text, len); id = gaim_imgstore_add(url_text, len, NULL); @@ -1612,7 +1721,8 @@ static gboolean msn_unload(GaimPlugin *p } static GaimPluginPrefFrame * -get_plugin_pref_frame(GaimPlugin *plugin) { +get_plugin_pref_frame(GaimPlugin *plugin) +{ GaimPluginPrefFrame *frame; GaimPluginPref *ppref; Index: notification.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/msn/notification.c,v retrieving revision 1.114.2.1 retrieving revision 1.114.2.2 diff -u -d -p -r1.114.2.1 -r1.114.2.2 --- notification.c 8 Sep 2004 01:11:02 -0000 1.114.2.1 +++ notification.c 8 Sep 2004 11:33:50 -0000 1.114.2.2 @@ -317,8 +317,6 @@ add_cmd(MsnCmdProc *cmdproc, MsnCommand if (user == NULL) { - gaim_debug_info("msn", "Creating new user. '%s' was not found.\n", - passport); user = msn_user_new(session->userlist, passport, friendly); msn_userlist_add_user(session->userlist, user); } @@ -410,7 +408,6 @@ add_error(MsnCmdProc *cmdproc, MsnTransa g_strfreev(params); } - static void adg_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd) { @@ -701,19 +698,14 @@ static void syn_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd) { MsnSession *session; - GaimConnection *gc; int total_users; session = cmdproc->session; - gc = gaim_account_get_connection(session->account); total_users = atoi(cmd->params[2]); if (total_users == 0) { - gaim_connection_set_state(gc, GAIM_CONNECTED); - session->logged_in = TRUE; - - serv_finish_login(gc); + msn_session_finish_login(session); } else { Index: session.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/msn/session.c,v retrieving revision 1.24 retrieving revision 1.24.2.1 diff -u -d -p -r1.24 -r1.24.2.1 --- session.c 6 Jun 2004 03:42:54 -0000 1.24 +++ session.c 8 Sep 2004 11:33:50 -0000 1.24.2.1 @@ -27,6 +27,8 @@ #include "slplink.h" +#include "dialog.h" + MsnSession * msn_session_new(GaimAccount *account, const char *host, int port, gboolean http_method) @@ -44,6 +46,7 @@ msn_session_new(GaimAccount *account, co session->notification = msn_notification_new(session); session->userlist = msn_userlist_new(session); + session->sync_userlist = msn_userlist_new(session); session->protocol_ver = 9; @@ -72,6 +75,9 @@ msn_session_destroy(MsnSession *session) msn_userlist_destroy(session->userlist); + if (session->sync_userlist != NULL) + msn_userlist_destroy(session->sync_userlist); + if (session->passport_info.kv != NULL) g_free(session->passport_info.kv); @@ -186,3 +192,97 @@ msn_session_get_swboard(MsnSession *sess return swboard; } + +static void +msn_session_sync_users(MsnSession *session) +{ + GList *l; + + l = session->sync_userlist->users; + + while (l != NULL) + { + MsnUser *local_user; + + local_user = (MsnUser *)l->data; + + if (local_user->passport != NULL) + { + MsnUser *remote_user; + + remote_user = msn_userlist_find_user(session->userlist, + local_user->passport); + + if (remote_user == NULL || + ((local_user->list_op & ( 1 << MSN_LIST_FL)) && + !(remote_user->list_op & ( 1 << MSN_LIST_FL)))) + { + /* The user was not on the server list */ + msn_show_sync_issue(session, local_user->passport, NULL); + } + else + { + GList *l; + + for (l = local_user->group_ids; l != NULL; l = l->next) + { + const char *group_name; + int gid; + gboolean found = FALSE; + GList *l2; + + group_name = + msn_userlist_find_group_name(local_user->userlist, + (int)l->data); + + gid = msn_userlist_find_group_id(remote_user->userlist, + group_name); + + for (l2 = remote_user->group_ids; l2 != NULL; l2 = l2->next) + { + if ((int)l2->data == gid) + { + found = TRUE; + break; + } + } + + if (!found) + { + /* The user was not on that group on the server list */ + msn_show_sync_issue(session, local_user->passport, + group_name); + } + } + } + } + + l = l->next; + } + + msn_userlist_destroy(session->sync_userlist); + session->sync_userlist = NULL; +} + +void +msn_session_finish_login(MsnSession *session) +{ + GaimAccount *account; + GaimConnection *gc; + + account = session->account; + gc = gaim_account_get_connection(account); + + msn_user_set_buddy_icon(session->user, + gaim_account_get_buddy_icon(session->account)); + + msn_change_status(session, MSN_ONLINE); + + gaim_connection_set_state(gc, GAIM_CONNECTED); + session->logged_in = TRUE; + + /* Sync users */ + msn_session_sync_users(session); + + serv_finish_login(gc); +} Index: session.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/msn/session.h,v retrieving revision 1.24 retrieving revision 1.24.2.1 diff -u -d -p -r1.24 -r1.24.2.1 --- session.h 23 Jun 2004 19:38:58 -0000 1.24 +++ session.h 8 Sep 2004 11:33:50 -0000 1.24.2.1 @@ -60,6 +60,7 @@ struct _MsnSession gint http_poll_timer; MsnUserList *userlist; + MsnUserList *sync_userlist; int servconns_count; GList *switches; @@ -141,4 +142,6 @@ MsnSwitchBoard *msn_session_find_swboard MsnSwitchBoard *msn_session_get_swboard(MsnSession *session, const char *username); +void msn_session_finish_login(MsnSession *session); + #endif /* _MSN_SESSION_H_ */ Index: switchboard.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/msn/switchboard.c,v retrieving revision 1.76 retrieving revision 1.76.2.1 diff -u -d -p -r1.76 -r1.76.2.1 --- switchboard.c 25 Aug 2004 01:43:54 -0000 1.76 +++ switchboard.c 8 Sep 2004 11:33:50 -0000 1.76.2.1 @@ -605,13 +605,14 @@ msn_switchboard_new(MsnSession *session) swboard->servconn = servconn = msn_servconn_new(session, MSN_SERVER_SB); cmdproc = servconn->cmdproc; - msn_servconn_set_connect_cb(servconn, connect_cb); - msn_servconn_set_disconnect_cb(servconn, disconnect_cb); - swboard->im_queue = g_queue_new(); if (session->http_method) servconn->http_data->server_type = "SB"; + else + msn_servconn_set_connect_cb(servconn, connect_cb); + + msn_servconn_set_disconnect_cb(servconn, disconnect_cb); servconn->data = swboard; @@ -799,8 +800,40 @@ got_swboard(MsnCmdProc *cmdproc, MsnComm msn_parse_socket(cmd->params[2], &host, &port); if (swboard->session->http_method) + { + GaimAccount *account; + MsnSession *session; + MsnServConn *servconn; + port = 80; + session = swboard->session; + servconn = swboard->servconn; + account = session->account; + + swboard->user_joined = TRUE; + + servconn->http_data->gateway_host = g_strdup(host); + +#if 0 + servconn->connected = TRUE; + servconn->cmdproc->ready = TRUE; +#endif + + if (msn_switchboard_is_invited(swboard)) + { + msn_cmdproc_send(servconn->cmdproc, "ANS", "%s %s %s", + gaim_account_get_username(account), + swboard->auth_key, swboard->session_id); + } + else + { + msn_cmdproc_send(servconn->cmdproc, "USR", "%s %s", + gaim_account_get_username(account), + swboard->auth_key); + } + } + msn_switchboard_connect(swboard, host, port); } Index: sync.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/msn/sync.c,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -u -d -p -r1.4 -r1.4.2.1 --- sync.c 23 Jun 2004 19:38:58 -0000 1.4 +++ sync.c 8 Sep 2004 11:33:50 -0000 1.4.2.1 @@ -110,24 +110,14 @@ static void lst_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd) { MsnSession *session = cmdproc->session; - GaimAccount *account = session->account; - GaimConnection *gc = gaim_account_get_connection(account); char *passport = NULL; const char *friend = NULL; int list_op; MsnUser *user; - passport = cmd->params[0]; - friend = gaim_url_decode(cmd->params[1]); - list_op = atoi(cmd->params[2]); - -#if 0 - gaim_debug_misc("msn", "Got list op = %d\n", list_op); - gaim_debug_misc("msn", "FL = %d\n", (list_op & MSN_LIST_FL_OP)); - gaim_debug_misc("msn", "AL = %d\n", (list_op & MSN_LIST_AL_OP)); - gaim_debug_misc("msn", "BL = %d\n", (list_op & MSN_LIST_BL_OP)); - gaim_debug_misc("msn", "RL = %d\n", (list_op & MSN_LIST_RL_OP)); -#endif + passport = cmd->params[0]; + friend = gaim_url_decode(cmd->params[1]); + list_op = atoi(cmd->params[2]); user = msn_user_new(session->userlist, passport, friend); @@ -175,15 +165,7 @@ lst_cmd(MsnCmdProc *cmdproc, MsnCommand { cmdproc->cbs_table = session->sync->old_cbs_table; - msn_user_set_buddy_icon(session->user, - gaim_account_get_buddy_icon(session->account)); - - msn_change_status(session, MSN_ONLINE); - - gaim_connection_set_state(gc, GAIM_CONNECTED); - session->logged_in = TRUE; - - serv_finish_login(gc); + msn_session_finish_login(session); msn_sync_destroy(session->sync); session->sync = NULL; Index: user.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/msn/user.c,v retrieving revision 1.19 retrieving revision 1.19.2.1 diff -u -d -p -r1.19 -r1.19.2.1 --- user.c 25 Aug 2004 01:43:54 -0000 1.19 +++ user.c 8 Sep 2004 11:33:50 -0000 1.19.2.1 @@ -210,7 +210,7 @@ msn_user_add_group_id(MsnUser *user, int const char *group_name; g_return_if_fail(user != NULL); - g_return_if_fail(id > -1); + g_return_if_fail(id >= 0); user->group_ids = g_list_append(user->group_ids, GINT_TO_POINTER(id)); @@ -238,7 +238,7 @@ void msn_user_remove_group_id(MsnUser *user, int id) { g_return_if_fail(user != NULL); - g_return_if_fail(id > -1); + g_return_if_fail(id >= 0); user->group_ids = g_list_remove(user->group_ids, GINT_TO_POINTER(id)); } Index: userlist.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/msn/userlist.c,v retrieving revision 1.16.2.1 retrieving revision 1.16.2.2 diff -u -d -p -r1.16.2.1 -r1.16.2.2 --- userlist.c 8 Sep 2004 01:49:07 -0000 1.16.2.1 +++ userlist.c 8 Sep 2004 11:33:50 -0000 1.16.2.2 @@ -251,14 +251,6 @@ msn_got_add_user(MsnSession *session, Ms "%s has added you to his or her contact list.\n", passport); -#if 0 - gaim_debug_misc("msn", "User's list op = %d\n", user->list_op); - gaim_debug_misc("msn", "FL = %d\n", (user->list_op & MSN_LIST_FL_OP)); - gaim_debug_misc("msn", "AL = %d\n", (user->list_op & MSN_LIST_AL_OP)); - gaim_debug_misc("msn", "BL = %d\n", (user->list_op & MSN_LIST_BL_OP)); - gaim_debug_misc("msn", "RL = %d\n", (user->list_op & MSN_LIST_RL_OP)); -#endif - if (!(user->list_op & (MSN_LIST_AL_OP | MSN_LIST_BL_OP | MSN_LIST_FL_OP))) { @@ -434,8 +426,6 @@ msn_userlist_destroy(MsnUserList *userli void msn_userlist_add_user(MsnUserList *userlist, MsnUser *user) { - gaim_debug_misc("msn", "[%p] Adding %s (%p)\n", - userlist, user->passport, user); userlist->users = g_list_append(userlist->users, user); } @@ -458,11 +448,6 @@ msn_userlist_find_user(MsnUserList *user g_return_val_if_fail(user->passport != NULL, NULL); -#if 0 - gaim_debug_misc("msn", "[%p] Comparing '%s' and '%s' (%p)\n", - userlist, passport, user->passport, user); -#endif - if (!strcmp(passport, user->passport)) return user; } @@ -637,9 +622,7 @@ msn_userlist_add_buddy(MsnUserList *user if (user_is_there(user, list_id, group_id)) { list = lists[list_id]; -#if 0 gaim_debug_error("msn", "User '%s' is already there: %s\n", who, list); -#endif return; } |