pidgin: 0707f870: purple_account_request_authorization() d...
nosnilmot at pidgin.im
nosnilmot at pidgin.im
Tue Jan 5 19:50:41 EST 2010
-----------------------------------------------------------------
Revision: 0707f870a510922ae86ef379b5f01efa76d01402
Ancestor: 335f87d4afca39d3be008897012b18b89d6523d3
Author: nosnilmot at pidgin.im
Date: 2010-01-06T00:48:50
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/0707f870a510922ae86ef379b5f01efa76d01402
Modified files:
libpurple/account.c
ChangeLog:
purple_account_request_authorization() does not require non-NULL auth and
deny callbacks, so let's not crash if it is not given them. This should fix
Fedora bug https://bugzilla.redhat.com/show_bug.cgi?id=552607 which I'm
guessing is caused by a 3rd party prpl
-------------- next part --------------
============================================================
--- libpurple/account.c dd13bab7fca8b0e473a34b378f7121743a383ed2
+++ libpurple/account.c 79e5584ad92f21209562a9dd3990e2dd8511b93a
@@ -1341,7 +1341,8 @@ request_auth_cb(void *data)
handles = g_list_remove(handles, info);
- info->auth_cb(info->userdata);
+ if (info->auth_cb != NULL)
+ info->auth_cb(info->userdata);
purple_signal_emit(purple_accounts_get_handle(),
"account-authorization-granted", info->account, info->user);
@@ -1356,7 +1357,8 @@ request_deny_cb(void *data)
handles = g_list_remove(handles, info);
- info->deny_cb(info->userdata);
+ if (info->deny_cb != NULL)
+ info->deny_cb(info->userdata);
purple_signal_emit(purple_accounts_get_handle(),
"account-authorization-denied", info->account, info->user);
@@ -1383,10 +1385,12 @@ purple_account_request_authorization(Pur
"account-authorization-requested", account, remote_user));
if (plugin_return > 0) {
- auth_cb(user_data);
+ if (auth_cb != NULL)
+ auth_cb(user_data);
return NULL;
} else if (plugin_return < 0) {
- deny_cb(user_data);
+ if (deny_cb != NULL)
+ deny_cb(user_data);
return NULL;
}
More information about the Commits
mailing list