/pidgin/main: b120a1fe399e: A patch from Euro on trac, heavily m...
John Bailey
rekkanoryo at rekkanoryo.org
Sun Nov 4 12:52:40 EST 2012
Changeset: b120a1fe399ea424a3310e452454aa9405c736a5
Author: John Bailey <rekkanoryo at rekkanoryo.org>
Date: 2012-11-04 12:38 -0500
Branch: release-2.x.y
URL: http://hg.pidgin.im/pidgin/main/rev/b120a1fe399e
Description:
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.
diffstat:
COPYRIGHT | 1 +
pidgin/plugins/cap/cap.c | 6 ++++--
2 files changed, 5 insertions(+), 2 deletions(-)
diffs (34 lines):
diff --git a/COPYRIGHT b/COPYRIGHT
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -17,6 +17,7 @@ control system to see from where it came
Copyright (C) 1998-2012 by the following:
+Mark
Saleem Abdulrasool
Jakub Adam
Dave Ahlswede
diff --git a/pidgin/plugins/cap/cap.c b/pidgin/plugins/cap/cap.c
--- a/pidgin/plugins/cap/cap.c
+++ b/pidgin/plugins/cap/cap.c
@@ -43,7 +43,7 @@ static double generate_prediction_for(Pu
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 @@ static double generate_prediction_for(Pu
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