From 327af51a28fe292cfc4a68caa086a13175a69719 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Sat, 21 Aug 2010 18:27:32 +0100 Subject: Some general cleanup, plus fixing a bug in the memberlist parsing code: the lists can come in in any order, so parse it *completely* before showing auth requests. --- protocols/msn/soap.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'protocols') diff --git a/protocols/msn/soap.c b/protocols/msn/soap.c index e67da2a1..8d276108 100644 --- a/protocols/msn/soap.c +++ b/protocols/msn/soap.c @@ -553,17 +553,11 @@ static xt_status msn_soap_memlist_member( struct xt_node *node, gpointer data ) else if( strcmp( role, "Block" ) == 0 ) bd->flags |= MSN_BUDDY_BL; else if( strcmp( role, "Reverse" ) == 0 ) - { bd->flags |= MSN_BUDDY_RL; - msn_buddy_ask( bu ); - } else if( strcmp( role, "Pending" ) == 0 ) - { bd->flags |= MSN_BUDDY_PL; - msn_buddy_ask( bu ); - } - printf( "%s %d\n", handle, bd->flags ); + printf( "%p %s %d\n", bu, handle, bd->flags ); return XT_HANDLED; } @@ -782,7 +776,18 @@ static const struct xt_handler_entry msn_soap_addressbook_parser[] = { static int msn_soap_addressbook_handle_response( struct msn_soap_req_data *soap_req ) { + GSList *l; + + for( l = soap_req->ic->bee->users; l; l = l->next ) + { + struct bee_user *bu = l->data; + + if( bu->ic == soap_req->ic ) + msn_buddy_ask( bu ); + } + msn_auth_got_contact_list( soap_req->ic ); + return MSN_SOAP_OK; } -- cgit v1.2.3