pidgin/android/libpurple

Parents acdc2b82a743
Children 878c94d4ffb3
Fix bugs and compile warnings related to requesting authorization.
These maybe started happening in revision 0819d40769c8

libymsg.c: In function 'yahoo_buddy_auth_req_15':
libymsg.c:1418:5: warning: passing argument 1 of 'yahoo_buddy_add_deny_cb' from incompatible pointer type [enabled by default]
libymsg.c:1233:1: note: expected 'const char *' but argument is of type 'struct yahoo_add_request *'
libymsg.c:1440:6: warning: passing argument 8 of 'purple_account_request_authorization' from incompatible pointer type [enabled by default]
In file included from ../../../libpurple/internal.h:160:0,
from libymsg.c:24:
../../../libpurple/account.h:311:7: note: expected 'PurpleAccountRequestAuthorizationCb' but argument is of type 'void (*)(const char *, struct yahoo_add_request *)'

libymsg.c: In function 'yahoo_buddy_added_us':
libymsg.c:1490:4: warning: passing argument 1 of 'yahoo_buddy_add_deny_cb' from incompatible pointer type [enabled by default]
libymsg.c:1233:1: note: expected 'const char *' but argument is of type 'struct yahoo_add_request *'
libymsg.c:1504:7: warning: passing argument 8 of 'purple_account_request_authorization' from incompatible pointer type [enabled by default]
In file included from ../../../libpurple/internal.h:160:0,
from libymsg.c:24:
../../../libpurple/account.h:311:7: note: expected 'PurpleAccountRequestAuthorizationCb' but argument is of type 'void (*)(const char *, struct yahoo_add_request *)'
--- a/libpurple/protocols/yahoo/libymsg.c Mon Feb 11 03:49:13 2013 +0100
+++ b/libpurple/protocols/yahoo/libymsg.c Mon Feb 18 14:37:18 2013 -0800
@@ -1230,8 +1230,9 @@
}
static void
-yahoo_buddy_add_deny_cb(const char *msg, struct yahoo_add_request *add_req)
+yahoo_buddy_add_deny_cb(const char *msg, gpointer data)
{
+ struct yahoo_add_request *add_req = data;
YahooData *yd = purple_connection_get_protocol_data(add_req->gc);
struct yahoo_packet *pkt;
char *encoded_msg = NULL;
@@ -1415,7 +1416,7 @@
{
purple_debug_misc("yahoo", "Auth. request from %s dropped and automatically denied due to privacy settings!\n",
add_req->who);
- yahoo_buddy_add_deny_cb(add_req, NULL);
+ yahoo_buddy_add_deny_cb(NULL, add_req);
return;
}
@@ -1487,7 +1488,7 @@
if (!purple_privacy_check(account, add_req->who)) {
purple_debug_misc("yahoo", "Auth. request from %s dropped and automatically denied due to privacy settings!\n",
add_req->who);
- yahoo_buddy_add_deny_cb(add_req, NULL);
+ yahoo_buddy_add_deny_cb(NULL, add_req);
return;
}