cpw.qulogic.msnp16: c1d04a0e: When looping through the request fields, ...

qulogic at pidgin.im qulogic at pidgin.im
Wed Dec 16 18:50:58 EST 2009


-----------------------------------------------------------------
Revision: c1d04a0ea8f286a66248d97e429c609897e7abaf
Ancestor: 8dfea9e767a0db884d1ab0346de6052890c0da55
Author: qulogic at pidgin.im
Date: 2009-12-16T23:45:27
Branch: im.pidgin.cpw.qulogic.msnp16
URL: http://d.pidgin.im/viewmtn/revision/info/c1d04a0ea8f286a66248d97e429c609897e7abaf

Modified files:
        libpurple/protocols/msn/msn.c

ChangeLog: 

When looping through the request fields, don't try to disconnect a field if
it doesn't actually refer to an endpoint.

-------------- next part --------------
============================================================
--- libpurple/protocols/msn/msn.c	2a4c88d03824ddf8d78c2b7e1ddf2614e08e3ecb
+++ libpurple/protocols/msn/msn.c	be2a75c3241762f574d3ac8371e85c0a73a19f69
@@ -388,8 +388,11 @@ update_endpoint_cb(MsnLocationData *data
 	for (others = purple_request_field_group_get_fields(data->group);
 	     others;
 	     others = g_list_next(others)) {
-		if (!purple_request_field_bool_get_value(others->data)) {
-			const char *id = purple_request_field_get_id(others->data);
+		PurpleRequestField *field = others->data;
+		if (purple_request_field_get_type(field) != PURPLE_REQUEST_FIELD_BOOLEAN)
+			continue;
+		if (!purple_request_field_bool_get_value(field)) {
+			const char *id = purple_request_field_get_id(field);
 			char *user;
 			purple_debug_info("msn", "Disconnecting Endpoint %s\n", id);
 


More information about the Commits mailing list