diff options
Diffstat (limited to 'protocols')
| -rw-r--r-- | protocols/msn/msn_util.c | 3 | ||||
| -rw-r--r-- | protocols/msn/ns.c | 2 | ||||
| -rw-r--r-- | protocols/msn/soap.c | 16 | 
3 files changed, 9 insertions, 12 deletions
| diff --git a/protocols/msn/msn_util.c b/protocols/msn/msn_util.c index 84d68b8c..069e68b8 100644 --- a/protocols/msn/msn_util.c +++ b/protocols/msn/msn_util.c @@ -64,8 +64,7 @@ static char *adlrml_entry( const char *handle_, msn_buddy_flags_t list )  	strcpy( handle, handle_ );  	if( ( domain = strchr( handle, '@' ) ) ) -		*(domain -		++) = '\0'; +		*(domain++) = '\0';  	else  		return NULL; diff --git a/protocols/msn/ns.c b/protocols/msn/ns.c index 23b8f3b1..5bf07c3e 100644 --- a/protocols/msn/ns.c +++ b/protocols/msn/ns.c @@ -704,7 +704,7 @@ void msn_auth_got_passport_token( struct im_connection *ic, char *token )  	md = ic->proto_data;  	{ -		char buf[1024]; +		char buf[1536];  		g_snprintf( buf, sizeof( buf ), "USR %d SSO S %s %s\r\n", ++md->trId, md->tokens[0], token );  		msn_write( ic, buf, strlen( buf ) ); diff --git a/protocols/msn/soap.c b/protocols/msn/soap.c index 13ef7e37..5d641542 100644 --- a/protocols/msn/soap.c +++ b/protocols/msn/soap.c @@ -202,9 +202,7 @@ static xt_status msn_soap_passport_sso_token( struct xt_node *node, gpointer dat  		return XT_HANDLED;  	id += strlen( id ) - 1;  	if( *id == '1' && -	    ( p = node->parent ) && ( p = p->parent ) && -	    ( p = xt_find_node( p->children, "wst:RequestedProofToken" ) ) && -	    ( p = xt_find_node( p->children, "wst:BinarySecret" ) ) && +	    ( p = xt_find_path( node, "../../wst:RequestedProofToken/wst:BinarySecret" ) ) &&  	    p->text )  	    	sd->secret = g_strdup( p->text ); @@ -476,8 +474,7 @@ static xt_status msn_soap_memlist_member( struct xt_node *node, gpointer data )  	struct msn_soap_req_data *soap_req = data;  	struct im_connection *ic = soap_req->ic; -	if( ( p = node->parent ) && ( p = p->parent ) && -	    ( p = xt_find_node( p->children, "MemberRole" ) ) ) +	if( ( p = xt_find_path( node, "../../MemberRole" ) ) )  		role = p->text;  	if( ( p = xt_find_node( node->children, "PassportName" ) ) ) @@ -635,8 +632,7 @@ static xt_status msn_soap_addressbook_group( struct xt_node *node, gpointer data  	char *id = NULL, *name = NULL;  	struct msn_soap_req_data *soap_req = data; -	if( ( p = node->parent ) && -	    ( p = xt_find_node( p->children, "groupId" ) ) ) +	if( ( p = xt_find_path( node, "../groupId" ) ) )  		id = p->text;  	if( ( p = xt_find_node( node->children, "name" ) ) ) @@ -656,8 +652,7 @@ static xt_status msn_soap_addressbook_contact( struct xt_node *node, gpointer da  	struct msn_soap_req_data *soap_req = data;  	struct im_connection *ic = soap_req->ic; -	if( ( p = node->parent ) && -	    ( p = xt_find_node( p->children, "contactId" ) ) ) +	if( ( p = xt_find_path( node, "../contactId" ) ) )  		id = p->text;  	if( ( p = xt_find_node( node->children, "contactType" ) ) )  		type = p->text; @@ -675,6 +670,9 @@ static xt_status msn_soap_addressbook_contact( struct xt_node *node, gpointer da  		return XT_HANDLED;  	} +	if( handle == NULL ) +		return XT_HANDLED; +	  	if( !( bu = bee_user_by_handle( ic->bee, ic, handle ) ) &&  	    !( bu = bee_user_new( ic->bee, ic, handle, 0 ) ) )  		return XT_HANDLED; | 
