/pidgin/main: 2b6a00fd8864: Fix bugs and compile warnings relate...

Mark Doliner mark at kingant.net
Mon Feb 18 17:37:27 EST 2013


Changeset: 2b6a00fd88642ae586f4a791865e81d26fde6347
Author:	 Mark Doliner <mark at kingant.net>
Date:	 2013-02-18 14:37 -0800
Branch:	 default
URL: http://hg.pidgin.im/pidgin/main/rev/2b6a00fd8864

Description:

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 *)'

diffstat:

 libpurple/protocols/yahoo/libymsg.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (32 lines):

diff --git a/libpurple/protocols/yahoo/libymsg.c b/libpurple/protocols/yahoo/libymsg.c
--- a/libpurple/protocols/yahoo/libymsg.c
+++ b/libpurple/protocols/yahoo/libymsg.c
@@ -1230,8 +1230,9 @@ yahoo_buddy_add_authorize_cb(const char 
 }
 
 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 @@ static void yahoo_buddy_auth_req_15(Purp
 			{
 				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 @@ static void yahoo_buddy_added_us(PurpleC
 		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;
 		}
 



More information about the Commits mailing list