From: <nos...@us...> - 2006-04-15 13:39:47
|
Revision: 16032 Author: nosnilmot Date: 2006-04-15 06:39:26 -0700 (Sat, 15 Apr 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16032&view=rev Log Message: ----------- Fix Coverity CID 135, don't dereference before the NULL check Modified Paths: -------------- trunk/src/protocols/msn/msn.c trunk/src/protocols/msn/session.c Modified: trunk/src/protocols/msn/msn.c =================================================================== --- trunk/src/protocols/msn/msn.c 2006-04-14 19:08:59 UTC (rev 16031) +++ trunk/src/protocols/msn/msn.c 2006-04-15 13:39:26 UTC (rev 16032) @@ -105,7 +105,7 @@ session = gc->proto_data; swboard = msn_session_get_swboard(session, gaim_conversation_get_name(conv), MSN_SB_FLAG_IM); - if (session == NULL || swboard == NULL) + if (swboard == NULL) return GAIM_CMD_RET_FAILED; msn_switchboard_send_msg(swboard, msg, TRUE); Modified: trunk/src/protocols/msn/session.c =================================================================== --- trunk/src/protocols/msn/session.c 2006-04-14 19:08:59 UTC (rev 16031) +++ trunk/src/protocols/msn/session.c 2006-04-15 13:39:26 UTC (rev 16032) @@ -209,6 +209,8 @@ { MsnSwitchBoard *swboard; + g_return_val_if_fail(session != NULL, NULL); + swboard = msn_session_find_swboard(session, username); if (swboard == NULL) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rl...@us...> - 2006-04-25 17:38:49
|
Revision: 16096 Author: rlaager Date: 2006-04-25 10:38:43 -0700 (Tue, 25 Apr 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16096&view=rev Log Message: ----------- Part of SF Patch #1437836 from Sadrul '3. replace a bunch of "if (a) free(a);" with "free(a);"' My comment in the patch: "I'm accepting this, even though it doesn't really do much. In the future, however, I would suggest avoiding creating these type of changes unless you're already editing the code directly around them." Modified Paths: -------------- trunk/src/protocols/msn/session.c trunk/src/protocols/msn/switchboard.c trunk/src/protocols/msn/user.c Modified: trunk/src/protocols/msn/session.c =================================================================== --- trunk/src/protocols/msn/session.c 2006-04-25 17:27:17 UTC (rev 16095) +++ trunk/src/protocols/msn/session.c 2006-04-25 17:38:43 UTC (rev 16096) @@ -70,18 +70,11 @@ msn_userlist_destroy(session->userlist); - if (session->passport_info.kv != NULL) - g_free(session->passport_info.kv); + g_free(session->passport_info.kv); + g_free(session->passport_info.sid); + g_free(session->passport_info.mspauth); + g_free(session->passport_info.client_ip); - if (session->passport_info.sid != NULL) - g_free(session->passport_info.sid); - - if (session->passport_info.mspauth != NULL) - g_free(session->passport_info.mspauth); - - if (session->passport_info.client_ip != NULL) - g_free(session->passport_info.client_ip); - if (session->passport_info.file != NULL) { g_unlink(session->passport_info.file); Modified: trunk/src/protocols/msn/switchboard.c =================================================================== --- trunk/src/protocols/msn/switchboard.c 2006-04-25 17:27:17 UTC (rev 16095) +++ trunk/src/protocols/msn/switchboard.c 2006-04-25 17:38:43 UTC (rev 16096) @@ -104,15 +104,10 @@ while ((l = swboard->ack_list) != NULL) msg_error_helper(swboard->cmdproc, l->data, MSN_MSG_ERROR_SB); - if (swboard->im_user != NULL) - g_free(swboard->im_user); + g_free(swboard->im_user); + g_free(swboard->auth_key); + g_free(swboard->session_id); - if (swboard->auth_key != NULL) - g_free(swboard->auth_key); - - if (swboard->session_id != NULL) - g_free(swboard->session_id); - for (l = swboard->users; l != NULL; l = l->next) g_free(l->data); Modified: trunk/src/protocols/msn/user.c =================================================================== --- trunk/src/protocols/msn/user.c 2006-04-25 17:27:17 UTC (rev 16095) +++ trunk/src/protocols/msn/user.c 2006-04-25 17:38:43 UTC (rev 16096) @@ -64,24 +64,13 @@ if (user->msnobj != NULL) msn_object_destroy(user->msnobj); - if (user->passport != NULL) - g_free(user->passport); + g_free(user->passport); + g_free(user->friendly_name); + g_free(user->store_name); + g_free(user->phone.home); + g_free(user->phone.work); + g_free(user->phone.mobile); - if (user->friendly_name != NULL) - g_free(user->friendly_name); - - if (user->store_name != NULL) - g_free(user->store_name); - - if (user->phone.home != NULL) - g_free(user->phone.home); - - if (user->phone.work != NULL) - g_free(user->phone.work); - - if (user->phone.mobile != NULL) - g_free(user->phone.mobile); - g_free(user); } @@ -134,9 +123,7 @@ { g_return_if_fail(user != NULL); - if (user->passport != NULL) - g_free(user->passport); - + g_free(user->passport); user->passport = g_strdup(passport); } @@ -145,9 +132,7 @@ { g_return_if_fail(user != NULL); - if (user->friendly_name != NULL) - g_free(user->friendly_name); - + g_free(user->friendly_name); user->friendly_name = g_strdup(name); } @@ -156,9 +141,7 @@ { g_return_if_fail(user != NULL); - if (user->store_name != NULL) - g_free(user->store_name); - + g_free(user->store_name); user->store_name = g_strdup(name); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rl...@us...> - 2006-05-01 20:37:56
|
Revision: 16115 Author: rlaager Date: 2006-05-01 13:37:37 -0700 (Mon, 01 May 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16115&view=rev Log Message: ----------- Resolve some unused value CIDs. This changeset just removes dead code. jabber chat.c CID 180 CID 181 msn httpconn.c CID 179 msn.c CID 185 CID 186 notification.c CID 189 slp.c CID 183 CID 184 switchboard.c CID 178 sync.c CID 187 CID 188 user.c CID 182 novell novell.c CID 190 sametime sametime.c CID 214 CID 215 yahoo yahoo.c CID 200 CID 201 CID 202 yahoo_doodle.c CID 168 CID 169 yahoo_filexfer.c CID 170 CID 171 CID 172 Modified Paths: -------------- trunk/src/protocols/jabber/chat.c trunk/src/protocols/msn/httpconn.c trunk/src/protocols/msn/msn.c trunk/src/protocols/msn/notification.c trunk/src/protocols/msn/slp.c trunk/src/protocols/msn/switchboard.c trunk/src/protocols/msn/sync.c trunk/src/protocols/msn/user.c trunk/src/protocols/novell/novell.c trunk/src/protocols/sametime/sametime.c trunk/src/protocols/yahoo/yahoo.c trunk/src/protocols/yahoo/yahoo_doodle.c trunk/src/protocols/yahoo/yahoo_filexfer.c Modified: trunk/src/protocols/jabber/chat.c =================================================================== --- trunk/src/protocols/jabber/chat.c 2006-05-01 20:31:25 UTC (rev 16114) +++ trunk/src/protocols/jabber/chat.c 2006-05-01 20:37:37 UTC (rev 16115) @@ -408,7 +408,6 @@ void jabber_chat_request_room_configure(JabberChat *chat) { JabberIq *iq; - xmlnode *query; char *room_jid; if(!chat) @@ -424,7 +423,6 @@ iq = jabber_iq_new_query(chat->js, JABBER_IQ_GET, "http://jabber.org/protocol/muc#owner"); - query = xmlnode_get_child(iq->node, "query"); room_jid = g_strdup_printf("%s@%s", chat->room, chat->server); xmlnode_set_attrib(iq->node, "to", room_jid); @@ -946,7 +944,7 @@ static void jabber_chat_disco_traffic_cb(JabberStream *js, xmlnode *packet, gpointer data) { JabberChat *chat; - xmlnode *query, *x, *error; + xmlnode *query, *x; int id = GPOINTER_TO_INT(data); if(!(chat = jabber_chat_find_by_id(js, id))) @@ -956,7 +954,7 @@ * support this request */ chat->xhtml = TRUE; - if((error = xmlnode_get_child(packet, "error"))) { + if(xmlnode_get_child(packet, "error")) { return; } Modified: trunk/src/protocols/msn/httpconn.c =================================================================== --- trunk/src/protocols/msn/httpconn.c 2006-05-01 20:31:25 UTC (rev 16114) +++ trunk/src/protocols/msn/httpconn.c 2006-05-01 20:37:37 UTC (rev 16115) @@ -564,7 +564,6 @@ size_t size, char **ret_buf, size_t *ret_size, gboolean *error) { - GaimConnection *gc; const char *s, *c; char *header, *body; const char *body_start; @@ -585,8 +584,6 @@ httpconn->waiting_response = FALSE; - gc = gaim_account_get_connection(httpconn->session->account); - /* Healthy defaults. */ body = NULL; Modified: trunk/src/protocols/msn/msn.c =================================================================== --- trunk/src/protocols/msn/msn.c 2006-05-01 20:31:25 UTC (rev 16114) +++ trunk/src/protocols/msn/msn.c 2006-05-01 20:37:37 UTC (rev 16115) @@ -401,12 +401,10 @@ if ((fp = g_fopen(filename, "rb")) == NULL) { GaimAccount *account; - GaimConnection *gc; const char *who; char *msg; account = slplink->session->account; - gc = gaim_account_get_connection(account); who = slplink->remote_user; msg = g_strdup_printf(_("Error reading %s: \n%s.\n"), @@ -1354,12 +1352,9 @@ if (b) { - GaimPresence *presence; GString *str = g_string_new(""); char *tmp; - presence = gaim_buddy_get_presence(b); - if (b->alias && b->alias[0]) { char *aliastext = g_markup_escape_text(b->alias, -1); Modified: trunk/src/protocols/msn/notification.c =================================================================== --- trunk/src/protocols/msn/notification.c 2006-05-01 20:31:25 UTC (rev 16114) +++ trunk/src/protocols/msn/notification.c 2006-05-01 20:37:37 UTC (rev 16115) @@ -557,7 +557,6 @@ static void adg_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd) { - MsnGroup *group; MsnSession *session; gint group_id; const char *group_name; @@ -568,7 +567,7 @@ group_name = gaim_url_decode(cmd->params[2]); - group = msn_group_new(session->userlist, group_id, group_name); + msn_group_new(session->userlist, group_id, group_name); /* There is a user that must me moved to this group */ if (cmd->trans->data) Modified: trunk/src/protocols/msn/slp.c =================================================================== --- trunk/src/protocols/msn/slp.c 2006-05-01 20:31:25 UTC (rev 16114) +++ trunk/src/protocols/msn/slp.c 2006-05-01 20:37:37 UTC (rev 16115) @@ -253,7 +253,6 @@ MsnSlpMessage *slpmsg; MsnObject *obj; char *msnobj_data; - const char *sha1c; const char *file_name; char *content; gsize len; @@ -273,7 +272,6 @@ msnobj_data = (char *)gaim_base64_decode(context, &len); obj = msn_object_new_from_string(msnobj_data); type = msn_object_get_type(obj); - sha1c = msn_object_get_sha1c(obj); g_free(msnobj_data); if (!(type == MSN_OBJECT_USERTILE)) @@ -1095,10 +1093,8 @@ else { MsnObject *my_obj = NULL; - const char *filename = NULL; gchar *data = NULL; gsize len = 0; - const char *my_info = NULL; GSList *sl, *list; #ifdef MSN_DEBUG_UD @@ -1109,13 +1105,12 @@ if (my_obj != NULL) { - filename = msn_object_get_real_location(my_obj); - my_info = msn_object_get_sha1c(my_obj); + const char *filename = msn_object_get_real_location(my_obj); + + if (filename != NULL) + g_file_get_contents(filename, &data, &len, NULL); } - if (filename != NULL) - g_file_get_contents(filename, &data, &len, NULL); - /* TODO: I think we need better buddy icon core functions. */ gaim_buddy_icons_set_for_user(account, user->passport, (void *)data, len); g_free(data); Modified: trunk/src/protocols/msn/switchboard.c =================================================================== --- trunk/src/protocols/msn/switchboard.c 2006-05-01 20:31:25 UTC (rev 16114) +++ trunk/src/protocols/msn/switchboard.c 2006-05-01 20:37:37 UTC (rev 16115) @@ -899,7 +899,6 @@ { GaimConnection *gc; MsnSwitchBoard *swboard; - const char *value; char *passport; gc = cmdproc->session->account->gc; @@ -907,7 +906,7 @@ passport = msg->remote_user; if (swboard->current_users == 1 && - (value = msn_message_get_attr(msg, "TypingUser")) != NULL) + msn_message_get_attr(msg, "TypingUser") != NULL) { serv_got_typing(gc, passport, MSN_TYPING_RECV_TIMEOUT, GAIM_TYPING); Modified: trunk/src/protocols/msn/sync.c =================================================================== --- trunk/src/protocols/msn/sync.c 2006-05-01 20:31:25 UTC (rev 16114) +++ trunk/src/protocols/msn/sync.c 2006-05-01 20:37:37 UTC (rev 16115) @@ -89,24 +89,22 @@ lsg_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd) { MsnSession *session = cmdproc->session; - MsnGroup *group; - GaimGroup *g; const char *name; int group_id; group_id = atoi(cmd->params[0]); name = gaim_url_decode(cmd->params[1]); - group = msn_group_new(session->userlist, group_id, name); + msn_group_new(session->userlist, group_id, name); /* HACK */ if (group_id == 0) /* Group of ungroupped buddies */ return; - if ((g = gaim_find_group(name)) == NULL) + if ((gaim_find_group(name)) == NULL) { - g = gaim_group_new(name); + GaimGroup *g = gaim_group_new(name); gaim_blist_add_group(g, NULL); } } Modified: trunk/src/protocols/msn/user.c =================================================================== --- trunk/src/protocols/msn/user.c 2006-05-01 20:31:25 UTC (rev 16114) +++ trunk/src/protocols/msn/user.c 2006-05-01 20:37:37 UTC (rev 16115) @@ -78,10 +78,8 @@ msn_user_update(MsnUser *user) { GaimAccount *account; - GaimConnection *gc; account = user->userlist->session->account; - gc = gaim_account_get_connection(account); if (user->status != NULL) gaim_prpl_got_user_status(account, user->passport, user->status, NULL); Modified: trunk/src/protocols/novell/novell.c =================================================================== --- trunk/src/protocols/novell/novell.c 2006-05-01 20:31:25 UTC (rev 16114) +++ trunk/src/protocols/novell/novell.c 2006-05-01 20:37:37 UTC (rev 16115) @@ -956,7 +956,6 @@ GaimConnection *gc; NMUserRecord *user_record = resp_data; char *err; - const char *display_id; GSList *cnode; NMConference *conference; gpointer chat; @@ -966,7 +965,6 @@ return; gc = gaim_account_get_connection(user->client_data); - display_id = nm_user_record_get_display_id(user_record); if (ret_code == NM_OK) { Modified: trunk/src/protocols/sametime/sametime.c =================================================================== --- trunk/src/protocols/sametime/sametime.c 2006-05-01 20:31:25 UTC (rev 16114) +++ trunk/src/protocols/sametime/sametime.c 2006-05-01 20:37:37 UTC (rev 16115) @@ -1176,7 +1176,6 @@ struct mwGaimPluginData *pd = data; struct mwSametimeList *stlist; - struct mwSession *s; struct mwGetBuffer *b; @@ -1193,8 +1192,6 @@ stlist = mwSametimeList_new(); mwSametimeList_get(b, stlist); - s = mwService_getSession(MW_SERVICE(srvc)); - /* merge or synch depending on preferences */ if(BLIST_PREF_IS_MERGE() || BLIST_PREF_IS_STORE()) { blist_merge(pd->gc, stlist); @@ -2615,8 +2612,6 @@ struct mwGaimPluginData *pd, const char *data) { - struct mwIdBlock *idb; - GHashTable *img_by_cid; GList *images; @@ -2625,8 +2620,6 @@ GaimMimeDocument *doc; const GList *parts; - idb = mwConversation_getTarget(conv); - img_by_cid = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, NULL); images = NULL; Modified: trunk/src/protocols/yahoo/yahoo.c =================================================================== --- trunk/src/protocols/yahoo/yahoo.c 2006-05-01 20:31:25 UTC (rev 16114) +++ trunk/src/protocols/yahoo/yahoo.c 2006-05-01 20:37:37 UTC (rev 16115) @@ -2383,15 +2383,15 @@ { if (!strcmp(key, "passwd")) return; - url = g_string_append_c(url, '&'); - url = g_string_append(url, key); - url = g_string_append_c(url, '='); + g_string_append_c(url, '&'); + g_string_append(url, key); + g_string_append_c(url, '='); if (!strcmp(key, ".save") || !strcmp(key, ".js")) - url = g_string_append_c(url, '1'); + g_string_append_c(url, '1'); else if (!strcmp(key, ".challenge")) - url = g_string_append(url, val); + g_string_append(url, val); else - url = g_string_append(url, gaim_url_encode(val)); + g_string_append(url, gaim_url_encode(val)); } static GHashTable *yahoo_login_page_hash(const char *buf, size_t len) @@ -2669,7 +2669,6 @@ YahooFriend *f; GaimPresence *presence; GaimStatus *status; - const char *status_id; if (!b || !(account = b->account) || !(gc = gaim_account_get_connection(account)) || !(yd = gc->proto_data)) @@ -2683,7 +2682,6 @@ presence = gaim_buddy_get_presence(b); status = gaim_presence_get_active_status(presence); - status_id = gaim_status_get_id(status); if (gaim_presence_is_online(presence) == FALSE) { *se = "offline"; @@ -3383,14 +3381,13 @@ static void yahoo_remove_buddy(GaimConnection *gc, GaimBuddy *buddy, GaimGroup *group) { struct yahoo_data *yd = (struct yahoo_data *)gc->proto_data; - YahooFriend *f; struct yahoo_packet *pkt; GSList *buddies, *l; GaimGroup *g; gboolean remove = TRUE; char *cg; - if (!(f = yahoo_friend_find(gc, buddy->name))) + if (!(yahoo_friend_find(gc, buddy->name))) return; buddies = gaim_find_buddies(gaim_connection_get_account(gc), buddy->name); Modified: trunk/src/protocols/yahoo/yahoo_doodle.c =================================================================== --- trunk/src/protocols/yahoo/yahoo_doodle.c 2006-05-01 20:31:25 UTC (rev 16114) +++ trunk/src/protocols/yahoo/yahoo_doodle.c 2006-05-01 20:37:37 UTC (rev 16115) @@ -116,7 +116,7 @@ /* Insert this 'session' in the list. At this point, it's only a * requested session. */ - wb = gaim_whiteboard_create(account, to, DOODLE_STATE_REQUESTING); + gaim_whiteboard_create(account, to, DOODLE_STATE_REQUESTING); } /* NOTE Perhaps some careful handling of remote assumed established @@ -193,7 +193,7 @@ dialog_message, NULL, NULL, NULL); */ - wb = gaim_whiteboard_create(account, from, DOODLE_STATE_REQUESTED); + gaim_whiteboard_create(account, from, DOODLE_STATE_REQUESTED); yahoo_doodle_command_send_request(gc, from); } Modified: trunk/src/protocols/yahoo/yahoo_filexfer.c =================================================================== --- trunk/src/protocols/yahoo/yahoo_filexfer.c 2006-05-01 20:31:25 UTC (rev 16114) +++ trunk/src/protocols/yahoo/yahoo_filexfer.c 2006-05-01 20:37:37 UTC (rev 16115) @@ -281,10 +281,8 @@ static void yahoo_xfer_end(GaimXfer *xfer) { - GaimAccount *account; struct yahoo_xfer_data *xfer_data; - account = gaim_xfer_get_account(xfer); xfer_data = xfer->data; if (xfer_data) @@ -400,11 +398,9 @@ static void yahoo_xfer_cancel_send(GaimXfer *xfer) { - GaimAccount *account; struct yahoo_xfer_data *xfer_data; xfer_data = xfer->data; - account = gaim_xfer_get_account(xfer); if (xfer_data) yahoo_xfer_data_free(xfer_data); @@ -413,10 +409,8 @@ static void yahoo_xfer_cancel_recv(GaimXfer *xfer) { - GaimAccount *account; struct yahoo_xfer_data *xfer_data; - account = gaim_xfer_get_account(xfer); xfer_data = xfer->data; if (xfer_data) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2006-06-17 01:33:15
|
Revision: 16271 Author: thekingant Date: 2006-06-16 18:33:09 -0700 (Fri, 16 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16271&view=rev Log Message: ----------- Some comment changes Modified Paths: -------------- trunk/src/protocols/msn/userlist.c trunk/src/protocols/oscar/oscar.c trunk/src/protocols/yahoo/yahoo_packet.c Modified: trunk/src/protocols/msn/userlist.c =================================================================== --- trunk/src/protocols/msn/userlist.c 2006-06-16 16:17:20 UTC (rev 16270) +++ trunk/src/protocols/msn/userlist.c 2006-06-17 01:33:09 UTC (rev 16271) @@ -292,6 +292,11 @@ if (!(user->list_op & (MSN_LIST_AL_OP | MSN_LIST_BL_OP))) { + /* + * TODO: The friendly name was NULL for me when I + * looked at this. Maybe we should use the store + * name instead? --KingAnt + */ got_new_entry(gc, passport, friendly); } } @@ -413,7 +418,12 @@ if (list_op & MSN_LIST_RL_OP) { /* These are users who have us on their buddy list. */ - /* TODO: what does store name is when this happens? */ + /* + * TODO: What is store name set to when this happens? + * For one of my accounts "som...@ho..." + * the store name was "something." Maybe we + * should use the friendly name, instead? --KingAnt + */ if (!(list_op & (MSN_LIST_AL_OP | MSN_LIST_BL_OP))) { Modified: trunk/src/protocols/oscar/oscar.c =================================================================== --- trunk/src/protocols/oscar/oscar.c 2006-06-16 16:17:20 UTC (rev 16270) +++ trunk/src/protocols/oscar/oscar.c 2006-06-17 01:33:09 UTC (rev 16271) @@ -1903,6 +1903,7 @@ file = g_fopen(iconfile, "rb"); if (file) { /* XXX - Use g_file_get_contents() */ + /* g_file_get_contents(iconfile, &data, &len, NULL); */ int len = fread(buf, 1, st.st_size, file); gaim_debug_info("oscar", "Sending buddy icon to %s (%d bytes, " Modified: trunk/src/protocols/yahoo/yahoo_packet.c =================================================================== --- trunk/src/protocols/yahoo/yahoo_packet.c 2006-06-16 16:17:20 UTC (rev 16270) +++ trunk/src/protocols/yahoo/yahoo_packet.c 2006-06-17 01:33:09 UTC (rev 16271) @@ -116,7 +116,7 @@ struct yahoo_pair *pair = g_new0(struct yahoo_pair, 1); - /* this is weird, and in one of the chat packets, and causes us + /* this is weird, and in one of the chat packets, and causes us to * think all the values are keys and all the keys are values after * this point if we don't handle it */ if (data[pos] == '\0') { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ev...@us...> - 2006-07-02 09:37:33
|
Revision: 16394 Author: evands Date: 2006-07-02 02:37:25 -0700 (Sun, 02 Jul 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16394&view=rev Log Message: ----------- msn_session_sync_users() iterates over the buddy list, following the ->next pointers of the groups, contacts, and buddies. msn_show_sync_issue(), if called, removed the buddy for which it was called, in preparation for the buddy either being added to the server list or confirmed-to-be-removed. This could lead to the buddy pointer being released and ->next therefore being junk. The buddy is now not removed until the user responds to the action dialog presented via msn_show_sync_issue(). I'm unclear why gtkgaim got away with this exercise in memory stomping but Adium/libgaim crashed every time, but it's safer in any case. I also changed some foo->bar to gaim_foo_get_bar(). Modified Paths: -------------- trunk/src/protocols/msn/dialog.c trunk/src/protocols/msn/session.c Modified: trunk/src/protocols/msn/dialog.c =================================================================== --- trunk/src/protocols/msn/dialog.c 2006-07-01 23:21:12 UTC (rev 16393) +++ trunk/src/protocols/msn/dialog.c 2006-07-02 09:37:25 UTC (rev 16394) @@ -34,9 +34,31 @@ } MsnAddRemData; +/* Remove the buddy referenced by the MsnAddRemData before the serverside list is changed. + * If the buddy will be added, he'll be added back; if he will be removed, he won't be. */ static void +msn_complete_sync_issue(MsnAddRemData *data) +{ + GaimBuddy *buddy; + GaimGroup *group = NULL; + + if (data->group != NULL) + group = gaim_find_group(data->group); + + if (group != NULL) + buddy = gaim_find_buddy_in_group(gaim_connection_get_account(data->gc), data->who, group); + else + buddy = gaim_find_buddy(gaim_connection_get_account(data->gc), data->who); + + if (buddy != NULL) + gaim_blist_remove_buddy(buddy); +} + +static void msn_add_cb(MsnAddRemData *data) { + msn_complete_sync_issue(data); + if (g_list_find(gaim_connections_get_all(), data->gc) != NULL) { MsnSession *session = data->gc->proto_data; @@ -55,6 +77,8 @@ static void msn_rem_cb(MsnAddRemData *data) { + msn_complete_sync_issue(data); + if (g_list_find(gaim_connections_get_all(), data->gc) != NULL) { MsnSession *session = data->gc->proto_data; @@ -78,8 +102,6 @@ GaimAccount *account; MsnAddRemData *data; char *msg, *reason; - GaimBuddy *buddy; - GaimGroup *group = NULL; account = session->account; gc = gaim_account_get_connection(account); @@ -114,17 +136,6 @@ _("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); } Modified: trunk/src/protocols/msn/session.c =================================================================== --- trunk/src/protocols/msn/session.c 2006-07-01 23:21:12 UTC (rev 16393) +++ trunk/src/protocols/msn/session.c 2006-07-02 09:37:25 UTC (rev 16394) @@ -231,7 +231,7 @@ * being logged in. This no longer happens, so we manually iterate * over the whole buddy list to identify sync issues. */ - for (gnode = gaim_get_blist()->root; gnode; gnode = gnode->next) { + for (gnode = gaim_blist_get_root(); gnode; gnode = gnode->next) { GaimGroup *group = (GaimGroup *)gnode; const char *group_name = group->name; if(!GAIM_BLIST_NODE_IS_GROUP(gnode)) @@ -244,11 +244,11 @@ if(!GAIM_BLIST_NODE_IS_BUDDY(bnode)) continue; b = (GaimBuddy *)bnode; - if(b->account == gc->account) { + if(gaim_buddy_get_account(b) == gaim_connection_get_account(gc)) { MsnUser *remote_user; gboolean found = FALSE; - remote_user = msn_userlist_find_user(session->userlist, b->name); + remote_user = msn_userlist_find_user(session->userlist, gaim_buddy_get_name(b)); if ((remote_user != NULL) && (remote_user->list_op & MSN_LIST_FL_OP)) { @@ -273,7 +273,7 @@ { /* The user was not on the server list or not in that group * on the server list */ - msn_show_sync_issue(session, b->name, group_name); + msn_show_sync_issue(session, gaim_buddy_get_name(b), group_name); } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2006-07-11 06:54:13
|
Revision: 16483 Author: thekingant Date: 2006-07-10 23:54:07 -0700 (Mon, 10 Jul 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16483&view=rev Log Message: ----------- Get rid of the "has you" overlay icon for MSN buddies. I don't think it's clear what this icon means, and I think it's more likely to confuse users than to help them. Having two cryptic red symbols on top of my buddies is just a bit too much for me. Modified Paths: -------------- trunk/pixmaps/status/default/Makefile.am trunk/src/protocols/msn/msn.c Removed Paths: ------------- trunk/pixmaps/status/default/nr.png Modified: trunk/pixmaps/status/default/Makefile.am =================================================================== --- trunk/pixmaps/status/default/Makefile.am 2006-07-11 01:12:35 UTC (rev 16482) +++ trunk/pixmaps/status/default/Makefile.am 2006-07-11 06:54:07 UTC (rev 16483) @@ -29,7 +29,6 @@ napster.png \ notauthorized.png \ novell.png \ - nr.png \ occupied.png \ offline.png \ op.png \ Deleted: trunk/pixmaps/status/default/nr.png =================================================================== (Binary files differ) Modified: trunk/src/protocols/msn/msn.c =================================================================== --- trunk/src/protocols/msn/msn.c 2006-07-11 01:12:35 UTC (rev 16482) +++ trunk/src/protocols/msn/msn.c 2006-07-11 06:54:07 UTC (rev 16483) @@ -507,8 +507,6 @@ { if (user->mobile) emblems[i++] = "wireless"; - if (!(user->list_op & (1 << MSN_LIST_RL))) - emblems[i++] = "nr"; } *se = emblems[0]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2006-07-20 07:31:21
|
Revision: 16523 Author: thekingant Date: 2006-07-20 00:31:15 -0700 (Thu, 20 Jul 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16523&view=rev Log Message: ----------- Fix a crazy MSN crash. Basically it's possible to have more than one slplink associated with a given switchboard, but our code did not allow for that. I think it happens when you're in a multi-user chat and you do stuff with multiple users that involves slplinks. Like maybe file transfer and buddy icon related stuff. Tracking this down took an ungodly amount of time, but thanks to Meebo for letting me do it :-) Modified Paths: -------------- trunk/src/protocols/msn/slp.c trunk/src/protocols/msn/slplink.c trunk/src/protocols/msn/switchboard.c trunk/src/protocols/msn/switchboard.h Modified: trunk/src/protocols/msn/slp.c =================================================================== --- trunk/src/protocols/msn/slp.c 2006-07-19 23:52:01 UTC (rev 16522) +++ trunk/src/protocols/msn/slp.c 2006-07-20 07:31:15 UTC (rev 16523) @@ -748,7 +748,7 @@ * reporting bugs. Hopefully this doesn't cause more crashes. Stu. */ if (slplink->swboard != NULL) - slplink->swboard->slplink = slplink; + slplink->swboard->slplinks = g_list_prepend(slplink->swboard->slplinks, slplink); else gaim_debug_error("msn", "msn_p2p_msg, swboard is NULL, ouch!\n"); } Modified: trunk/src/protocols/msn/slplink.c =================================================================== --- trunk/src/protocols/msn/slplink.c 2006-07-19 23:52:01 UTC (rev 16522) +++ trunk/src/protocols/msn/slplink.c 2006-07-20 07:31:15 UTC (rev 16523) @@ -102,7 +102,7 @@ g_return_if_fail(slplink != NULL); if (slplink->swboard != NULL) - slplink->swboard->slplink = NULL; + slplink->swboard->slplinks = g_list_remove(slplink->swboard->slplinks, slplink); session = slplink->session; @@ -256,7 +256,7 @@ return; /* If swboard is destroyed we will be too */ - slplink->swboard->slplink = slplink; + slplink->swboard->slplinks = g_list_prepend(slplink->swboard->slplinks, slplink); } msn_switchboard_send_msg(slplink->swboard, msg, TRUE); Modified: trunk/src/protocols/msn/switchboard.c =================================================================== --- trunk/src/protocols/msn/switchboard.c 2006-07-19 23:52:01 UTC (rev 16522) +++ trunk/src/protocols/msn/switchboard.c 2006-07-20 07:31:15 UTC (rev 16523) @@ -82,8 +82,8 @@ swboard->destroying = TRUE; /* If it linked us is because its looking for trouble */ - if (swboard->slplink != NULL) - msn_slplink_destroy(swboard->slplink); + while (swboard->slplinks != NULL) + msn_slplink_destroy(swboard->slplinks->data); /* Destroy the message queue */ while ((msg = g_queue_pop_head(swboard->msg_queue)) != NULL) Modified: trunk/src/protocols/msn/switchboard.h =================================================================== --- trunk/src/protocols/msn/switchboard.h 2006-07-19 23:52:01 UTC (rev 16522) +++ trunk/src/protocols/msn/switchboard.h 2006-07-20 07:31:15 UTC (rev 16523) @@ -102,7 +102,7 @@ MsnSBErrorType error; /**< The error that occurred in this switchboard (if applicable). */ - MsnSlpLink *slplink; /**< The slplink that is using this switchboard. */ + GList *slplinks; /**< The list of slplinks that are using this switchboard. */ }; /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2006-08-11 08:01:18
|
Revision: 16704 Author: thekingant Date: 2006-08-11 01:01:16 -0700 (Fri, 11 Aug 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16704&view=rev Log Message: ----------- #if 0 some of the MSN listen-for-connection code for file transfers. It wasn't being used Modified Paths: -------------- trunk/src/protocols/msn/directconn.c trunk/src/protocols/msn/directconn.h Modified: trunk/src/protocols/msn/directconn.c =================================================================== --- trunk/src/protocols/msn/directconn.c 2006-08-11 07:15:39 UTC (rev 16703) +++ trunk/src/protocols/msn/directconn.c 2006-08-11 08:01:16 UTC (rev 16704) @@ -76,6 +76,7 @@ * Connection Functions **************************************************************************/ +#if 0 static int create_listener(int port) { @@ -159,6 +160,7 @@ return fd; } +#endif static size_t msn_directconn_write(MsnDirectConn *directconn, @@ -447,6 +449,7 @@ return FALSE; } +#if 0 void msn_directconn_listen(MsnDirectConn *directconn) { @@ -466,6 +469,7 @@ directconn->port = port; directconn->c = 0; } +#endif MsnDirectConn* msn_directconn_new(MsnSlpLink *slplink) Modified: trunk/src/protocols/msn/directconn.h =================================================================== --- trunk/src/protocols/msn/directconn.h 2006-08-11 07:15:39 UTC (rev 16703) +++ trunk/src/protocols/msn/directconn.h 2006-08-11 08:01:16 UTC (rev 16704) @@ -50,7 +50,9 @@ MsnDirectConn *msn_directconn_new(MsnSlpLink *slplink); gboolean msn_directconn_connect(MsnDirectConn *directconn, const char *host, int port); +#if 0 void msn_directconn_listen(MsnDirectConn *directconn); +#endif void msn_directconn_send_msg(MsnDirectConn *directconn, MsnMessage *msg); void msn_directconn_parse_nonce(MsnDirectConn *directconn, const char *nonce); void msn_directconn_destroy(MsnDirectConn *directconn); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2006-08-14 07:00:30
|
Revision: 16746 Author: thekingant Date: 2006-08-14 00:00:26 -0700 (Mon, 14 Aug 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16746&view=rev Log Message: ----------- Alright, SVN gaim_proxy_connect()'s are good Modified Paths: -------------- trunk/src/protocols/msn/directconn.c trunk/src/protocols/msn/directconn.h trunk/src/protocols/msn/httpconn.c trunk/src/protocols/msn/httpconn.h trunk/src/protocols/msn/servconn.c trunk/src/protocols/msn/servconn.h Modified: trunk/src/protocols/msn/directconn.c =================================================================== --- trunk/src/protocols/msn/directconn.c 2006-08-14 06:38:12 UTC (rev 16745) +++ trunk/src/protocols/msn/directconn.c 2006-08-14 07:00:26 UTC (rev 16746) @@ -288,11 +288,6 @@ /* ERROR */ gaim_debug_error("msn", "error reading\n"); - if (directconn->inpa) - gaim_input_remove(directconn->inpa); - - close(directconn->fd); - msn_directconn_destroy(directconn); return; @@ -307,11 +302,6 @@ /* ERROR */ gaim_debug_error("msn", "error reading\n"); - if (directconn->inpa) - gaim_input_remove(directconn->inpa); - - close(directconn->fd); - msn_directconn_destroy(directconn); return; @@ -358,17 +348,12 @@ /* ERROR */ gaim_debug_error("msn", "error reading\n"); - if (directconn->inpa) - gaim_input_remove(directconn->inpa); - - close(directconn->fd); - msn_directconn_destroy(directconn); } } static void -connect_cb(gpointer data, gint source) +connect_cb(gpointer data, gint source, const gchar *error_message) { MsnDirectConn* directconn; int fd; @@ -376,6 +361,7 @@ gaim_debug_misc("msn", "directconn: connect_cb: %d\n", source); directconn = data; + directconn->connect_info = NULL; if (TRUE) { @@ -423,7 +409,6 @@ msn_directconn_connect(MsnDirectConn *directconn, const char *host, int port) { MsnSession *session; - GaimProxyConnectInfo *connect_info; g_return_val_if_fail(directconn != NULL, FALSE); g_return_val_if_fail(host != NULL, TRUE); @@ -438,10 +423,10 @@ } #endif - connect_info = gaim_proxy_connect(session->account, host, port, + directconn->connect_info = gaim_proxy_connect(session->account, host, port, connect_cb, directconn); - if (connect_info != NULL) + if (directconn->connect_info != NULL) { return TRUE; } @@ -491,6 +476,15 @@ void msn_directconn_destroy(MsnDirectConn *directconn) { + if (directconn->connect_info != NULL) + gaim_proxy_connect_cancel(directconn->connect_info); + + if (directconn->inpa != 0) + gaim_input_remove(directconn->inpa); + + if (directconn->fd >= 0) + close(directconn->fd); + if (directconn->nonce != NULL) g_free(directconn->nonce); Modified: trunk/src/protocols/msn/directconn.h =================================================================== --- trunk/src/protocols/msn/directconn.h 2006-08-14 06:38:12 UTC (rev 16745) +++ trunk/src/protocols/msn/directconn.h 2006-08-14 07:00:26 UTC (rev 16746) @@ -35,6 +35,8 @@ MsnSlpLink *slplink; MsnSlpCall *initial_call; + GaimProxyConnectInfo *connect_info; + gboolean acked; char *nonce; Modified: trunk/src/protocols/msn/httpconn.c =================================================================== --- trunk/src/protocols/msn/httpconn.c 2006-08-14 06:38:12 UTC (rev 16745) +++ trunk/src/protocols/msn/httpconn.c 2006-08-14 07:00:26 UTC (rev 16746) @@ -693,21 +693,12 @@ } static void -connect_cb(gpointer data, gint source) +connect_cb(gpointer data, gint source, const gchar *error_message) { - MsnHttpConn *httpconn = data; + MsnHttpConn *httpconn; - /* - TODO: Need to do this in case the account is disabled while connecting - if (!g_list_find(gaim_connections_get_all(), gc)) - { - if (source >= 0) - close(source); - destroy_new_conn_data(new_conn_data); - return; - } - */ - + httpconn = data; + httpconn->connect_info = NULL; httpconn->fd = source; if (source >= 0) @@ -729,8 +720,6 @@ gboolean msn_httpconn_connect(MsnHttpConn *httpconn, const char *host, int port) { - GaimProxyConnectInfo *connect_info; - g_return_val_if_fail(httpconn != NULL, FALSE); g_return_val_if_fail(host != NULL, FALSE); g_return_val_if_fail(port > 0, FALSE); @@ -738,10 +727,10 @@ if (httpconn->connected) msn_httpconn_disconnect(httpconn); - connect_info = gaim_proxy_connect(httpconn->session->account, + httpconn->connect_info = gaim_proxy_connect(httpconn->session->account, "gateway.messenger.hotmail.com", 80, connect_cb, httpconn); - if (connect_info != NULL) + if (httpconn->connect_info != NULL) { httpconn->waiting_response = TRUE; httpconn->connected = TRUE; @@ -758,11 +747,18 @@ if (!httpconn->connected) return; + if (httpconn->connect_info != NULL) + { + gaim_proxy_connect_cancel(httpconn->connect_info); + httpconn->connect_info = NULL; + } + if (httpconn->timer) + { gaim_timeout_remove(httpconn->timer); + httpconn->timer = 0; + } - httpconn->timer = 0; - if (httpconn->inpa > 0) { gaim_input_remove(httpconn->inpa); @@ -770,6 +766,7 @@ } close(httpconn->fd); + httpconn->fd = -1; g_free(httpconn->rx_buf); httpconn->rx_buf = NULL; Modified: trunk/src/protocols/msn/httpconn.h =================================================================== --- trunk/src/protocols/msn/httpconn.h 2006-08-14 06:38:12 UTC (rev 16745) +++ trunk/src/protocols/msn/httpconn.h 2006-08-14 07:00:26 UTC (rev 16746) @@ -37,6 +37,8 @@ MsnSession *session; /**< The MSN Session. */ MsnServConn *servconn; /**< The connection object. */ + GaimProxyConnectInfo *connect_info; + char *full_session_id; /**< The full session id. */ char *session_id; /**< The trimmed session id. */ Modified: trunk/src/protocols/msn/servconn.c =================================================================== --- trunk/src/protocols/msn/servconn.c 2006-08-14 06:38:12 UTC (rev 16745) +++ trunk/src/protocols/msn/servconn.c 2006-08-14 07:00:26 UTC (rev 16746) @@ -166,10 +166,12 @@ **************************************************************************/ static void -connect_cb(gpointer data, gint source) +connect_cb(gpointer data, gint source, const gchar *error_message) { - MsnServConn *servconn = data; + MsnServConn *servconn; + servconn = data; + servconn->connect_info = NULL; servconn->processing = FALSE; if (servconn->wasted) @@ -199,7 +201,6 @@ msn_servconn_connect(MsnServConn *servconn, const char *host, int port) { MsnSession *session; - GaimProxyConnectInfo *connect_info; g_return_val_if_fail(servconn != NULL, FALSE); g_return_val_if_fail(host != NULL, FALSE); @@ -232,10 +233,10 @@ return TRUE; } - connect_info = gaim_proxy_connect(session->account, host, port, + servconn->connect_info = gaim_proxy_connect(session->account, host, port, connect_cb, servconn); - if (connect_info != NULL) + if (servconn->connect_info != NULL) { servconn->processing = TRUE; return TRUE; @@ -267,6 +268,12 @@ return; } + if (servconn->connect_info != NULL) + { + gaim_proxy_connect_cancel(servconn->connect_info); + servconn->connect_info = NULL; + } + if (servconn->inpa > 0) { gaim_input_remove(servconn->inpa); Modified: trunk/src/protocols/msn/servconn.h =================================================================== --- trunk/src/protocols/msn/servconn.h 2006-08-14 06:38:12 UTC (rev 16745) +++ trunk/src/protocols/msn/servconn.h 2006-08-14 07:00:26 UTC (rev 16746) @@ -63,6 +63,8 @@ MsnSession *session; /**< The MSN session of this connection. */ MsnCmdProc *cmdproc; /**< The command processor of this connection. */ + GaimProxyConnectInfo *connect_info; + gboolean connected; /**< A flag that states if it's connected. */ gboolean processing; /**< A flag that states if something is working with this connection. */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |