libpurple 32426:b120a1fe399e: A patch from Euro on trac, heavily...

commits at adium.im commits at adium.im
Tue Feb 12 12:58:32 UTC 2013


details:	http://hg.adium.im/libpurple/rev/b120a1fe399e
revision:	32426:b120a1fe399e
branch:		release-2.x.y
author:		John Bailey <rekkanoryo at rekkanoryo.org>
date:		Sun Nov 04 12:38:21 2012 -0500

A patch from Euro on trac, heavily modified by me for simplicity and to kill
off C99-isms.  This should resolve a crash condition in the CAP plugin.  Fixes
#15327.

diffs (34 lines):

diff -r 581716bd2b64 -r b120a1fe399e COPYRIGHT
--- a/COPYRIGHT	Tue Oct 09 00:58:01 2012 -0400
+++ b/COPYRIGHT	Sun Nov 04 12:38:21 2012 -0500
@@ -17,6 +17,7 @@
 
 Copyright (C) 1998-2012 by the following:
 
+Mark
 Saleem Abdulrasool
 Jakub Adam
 Dave Ahlswede
diff -r 581716bd2b64 -r b120a1fe399e pidgin/plugins/cap/cap.c
--- a/pidgin/plugins/cap/cap.c	Tue Oct 09 00:58:01 2012 -0400
+++ b/pidgin/plugins/cap/cap.c	Sun Nov 04 12:38:21 2012 -0500
@@ -43,7 +43,7 @@
 	int threshold = purple_prefs_get_int("/plugins/gtk/cap/threshold");
 	int min_minute = (current_minute - threshold) % 1440;
 	int max_minute = (current_minute + threshold) % 1440;
-	char *sql;
+	char *sql, sta_id = NULL;
 	sqlite3_stmt *stmt = NULL;
 	const char *tail = NULL;
 	int rc;
@@ -94,7 +94,9 @@
 	sqlite3_free(sql);
 
 
-	if(strcmp(purple_status_get_id(get_status_for(buddy)), "offline") == 0) {
+	sta_id = purple_status_get_id(get_status_for(buddy));
+
+	if(sta_id && !strcmp(sta_id, "offline")) {
 		/* This is kind of stupid, change it. */
 		if(prediction == 1.0f)
 			prediction = 0.0f;




More information about the commits mailing list