dovecot-2.2: lib-http: Added http_client_request_get_target()

dovecot at dovecot.org dovecot at dovecot.org
Mon Jun 30 21:11:46 UTC 2014


details:   http://hg.dovecot.org/dovecot-2.2/rev/40e128ff3537
changeset: 17546:40e128ff3537
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Jul 01 00:10:21 2014 +0300
description:
lib-http: Added http_client_request_get_target()
This can be useful in error message logging without having to duplicate the
string.

diffstat:

 src/lib-http/http-client-request.c |  5 +++++
 src/lib-http/http-client.h         |  1 +
 2 files changed, 6 insertions(+), 0 deletions(-)

diffs (26 lines):

diff -r 2c2b94840ff3 -r 40e128ff3537 src/lib-http/http-client-request.c
--- a/src/lib-http/http-client-request.c	Mon Jun 30 17:25:02 2014 +0300
+++ b/src/lib-http/http-client-request.c	Tue Jul 01 00:10:21 2014 +0300
@@ -336,6 +336,11 @@
 	return 1;    /* valid delay */
 }
 
+const char *http_client_request_get_target(struct http_client_request *req)
+{
+	return req->target;
+}
+
 enum http_request_state
 http_client_request_get_state(struct http_client_request *req)
 {
diff -r 2c2b94840ff3 -r 40e128ff3537 src/lib-http/http-client.h
--- a/src/lib-http/http-client.h	Mon Jun 30 17:25:02 2014 +0300
+++ b/src/lib-http/http-client.h	Tue Jul 01 00:10:21 2014 +0300
@@ -185,6 +185,7 @@
 void http_client_request_delay(struct http_client_request *req,
 	time_t seconds);
 
+const char *http_client_request_get_target(struct http_client_request *req);
 enum http_request_state
 http_client_request_get_state(struct http_client_request *req);
 void http_client_request_submit(struct http_client_request *req);


More information about the dovecot-cvs mailing list