]> git.ipfire.org Git - thirdparty/dovecot/core.git/commit
lib-http: Clarify http_client_request_*_payload() API and minor change to it
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 22 Feb 2016 18:47:37 +0000 (20:47 +0200)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 22 Feb 2016 18:55:29 +0000 (20:55 +0200)
commitc3a4c931e95737a52e1cebeeb109a2e1cc4d47d6
tree51882980257d7f7ea098c01a738eaee20c8759de
parentd1f964d3f1dd9c5868b134c4f44dd63f3722eef7
lib-http: Clarify http_client_request_*_payload() API and minor change to it

The earlier behavior was pretty confusing, and potentially could have caused
double-freeing memory in some situations. Now it's clear that req is set to NULL
always when the request is finished, regardless of whether it has any references left.

Changed http_client_request_finish_payload() to return 0 on success instead of 1.
This could have been left alone, but it's unlikely that there is any code outside
Dovecot core that calls it and this way is cleaner.
src/lib-http/http-client-request.c
src/lib-http/http-client.h
src/plugins/fts-solr/solr-connection.c