dovecot-2.2: lib-http: server: Made sure destroy callback is cal...

dovecot at dovecot.org dovecot at dovecot.org
Wed Sep 10 10:44:18 UTC 2014


details:   http://hg.dovecot.org/dovecot-2.2/rev/4e339d81e1d2
changeset: 17768:4e339d81e1d2
user:      Stephan Bosch <stephan at rename-it.nl>
date:      Wed Sep 10 13:39:37 2014 +0300
description:
lib-http: server: Made sure destroy callback is called only once.

diffstat:

 src/lib-http/http-server-request.c |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diffs (15 lines):

diff -r 7ccf5dd98be8 -r 4e339d81e1d2 src/lib-http/http-server-request.c
--- a/src/lib-http/http-server-request.c	Wed Sep 10 13:39:37 2014 +0300
+++ b/src/lib-http/http-server-request.c	Wed Sep 10 13:39:37 2014 +0300
@@ -59,8 +59,10 @@
 	if (req->delay_destroy) {
 		req->destroy_pending = TRUE;
 	} else if (req->destroy_callback != NULL) {
-		req->destroy_callback(req->destroy_context);
+		void (*callback)(void *) = req->destroy_callback;
+
 		req->destroy_callback = NULL;
+		callback(req->destroy_context);
 	}
 	http_server_request_unref(_req);
 }


More information about the dovecot-cvs mailing list