dovecot-2.2: push-notification: OX driver error handling fix - g...

dovecot at dovecot.org dovecot at dovecot.org
Fri Oct 2 09:12:21 UTC 2015


details:   http://hg.dovecot.org/dovecot-2.2/rev/012d11e9cb67
changeset: 19272:012d11e9cb67
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Oct 02 11:17:53 2015 +0300
description:
push-notification: OX driver error handling fix - garbage metadata was returned on failure.

diffstat:

 src/plugins/push-notification/push-notification-driver-ox.c |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diffs (19 lines):

diff -r 990030864e16 -r 012d11e9cb67 src/plugins/push-notification/push-notification-driver-ox.c
--- a/src/plugins/push-notification/push-notification-driver-ox.c	Thu Oct 01 21:02:55 2015 -0600
+++ b/src/plugins/push-notification/push-notification-driver-ox.c	Fri Oct 02 11:17:53 2015 +0300
@@ -168,12 +168,14 @@
     if (!use_existing_txn) {
         mailbox_free(&inbox);
     }
+    if (!success)
+	    return NULL;
 
     dconfig->cached_ox_metadata =
         p_strdup(dtxn->ptxn->muser->pool, attr.value);
     dconfig->cached_ox_metadata_timestamp = ioloop_time;
 
-    return (success == TRUE) ? attr.value : NULL;
+    return dconfig->cached_ox_metadata;
 }
 
 static bool push_notification_driver_ox_begin_txn


More information about the dovecot-cvs mailing list