im.pidgin.pidgin: 82ae4511a5006e8f04cd58e034b718deba69321a

typ0 at pidgin.im typ0 at pidgin.im
Wed Oct 3 22:41:20 EDT 2007


revision:            82ae4511a5006e8f04cd58e034b718deba69321a
date:                2007-10-04T02:34:10
author:              typ0 at pidgin.im
branch:              im.pidgin.pidgin
changelog:
Keep MsnUser->list_op in sync.
Silence compiler warnings about unused vars.

manifest:
format_version "1"

new_manifest [6ccabaede280a9a30e7743088de2cbb6593a0bd4]

old_revision [4d7f27cb775119ea8f6387f00d355857c99e9f44]

patch "libpurple/protocols/msn/contact.c"
 from [498b10c1811841704c3a76f0f1b7ecbede5c1863]
   to [2be23296aca8a7a0ccd7aa62a5bf7be2de322621]
-------------- next part --------------
#
#
# patch "libpurple/protocols/msn/contact.c"
#  from [498b10c1811841704c3a76f0f1b7ecbede5c1863]
#    to [2be23296aca8a7a0ccd7aa62a5bf7be2de322621]
#
============================================================
--- libpurple/protocols/msn/contact.c	498b10c1811841704c3a76f0f1b7ecbede5c1863
+++ libpurple/protocols/msn/contact.c	2be23296aca8a7a0ccd7aa62a5bf7be2de322621
@@ -1106,7 +1106,6 @@ msn_add_contact_to_group_read_cb(MsnSoap
 	}
 
 	if (state->action & MSN_ADD_BUDDY) {
-		MsnUser *user = msn_userlist_find_user(userlist, state->who);
 
         	if ( !msn_user_is_yahoo(soapconn->session->account, state->who) ) {
 
@@ -1426,6 +1425,7 @@ msn_del_contact_from_list_read_cb(MsnSoa
 	g_return_val_if_fail(soapconn->data_cb != NULL, TRUE);
 	g_return_val_if_fail(soapconn->session != NULL, FALSE);
 	g_return_val_if_fail(soapconn->session->contact != NULL, FALSE);
+	g_return_val_if_fail(soapconn->session->userlist != NULL, FALSE);
 
 	state = (MsnCallbackState *) soapconn->data_cb;
 
@@ -1437,6 +1437,11 @@ msn_del_contact_from_list_read_cb(MsnSoa
 	purple_debug_info("MSN CL", "Contact %s deleted successfully from %s list on server!\n", state->who, MsnMemberRole[state->list_id]);
 
 	if (state->list_id == MSN_LIST_PL) {
+		MsnUser *user = msn_userlist_find_user(soapconn->session->userlist, state->who);
+		
+		if (user != NULL)
+			msn_user_unset_op(user, MSN_LIST_PL_OP);
+
 		msn_add_contact_to_list(soapconn->session->contact, state, state->who, MSN_LIST_RL);
 		return TRUE;
 	}
@@ -1530,6 +1535,8 @@ msn_add_contact_to_list_read_cb(MsnSoapC
 	MsnCallbackState *state = NULL;
 
 	g_return_val_if_fail(soapconn->data_cb != NULL, TRUE);
+	g_return_val_if_fail(soapconn->session != NULL, FALSE);
+	g_return_val_if_fail(soapconn->session->userlist != NULL, FALSE);
 
 	state = (MsnCallbackState *) soapconn->data_cb;
 	
@@ -1540,12 +1547,19 @@ msn_add_contact_to_list_read_cb(MsnSoapC
 	
 	purple_debug_info("MSN CL", "Contact %s added successfully to %s list on server!\n", state->who, MsnMemberRole[state->list_id]);
 
-	if (state->list_id == MSN_LIST_RL && (state->action & MSN_DENIED_BUDDY) ) {
-		g_return_val_if_fail(soapconn->session != NULL, FALSE);
-		g_return_val_if_fail(soapconn->session->contact != NULL, FALSE);
+	if (state->list_id == MSN_LIST_RL) {
+		MsnUser *user = msn_userlist_find_user(soapconn->session->userlist, state->who);
+		
+		if (user != NULL) {
+			msn_user_set_op(user, MSN_LIST_RL_OP);
+		}
 
-		msn_add_contact_to_list(soapconn->session->contact, NULL, state->who, MSN_LIST_BL);
-		return TRUE;
+		if (state->action & MSN_DENIED_BUDDY) {
+			g_return_val_if_fail(soapconn->session->contact != NULL, FALSE);
+
+			msn_add_contact_to_list(soapconn->session->contact, NULL, state->who, MSN_LIST_BL);
+			return TRUE;
+		}
 	}
 
 	if (state->list_id == MSN_LIST_AL) {


More information about the Commits mailing list