diff options
author | Timm Bäder <mail@baedert.org> | 2016-07-18 10:33:23 +0200 |
---|---|---|
committer | Christophe Fergeau <cfergeau@redhat.com> | 2016-07-19 13:22:15 +0200 |
commit | d6bd5d7b4c4b71e8c256729ae1954e3f27855a00 (patch) | |
tree | 14675f1a8226c2a3ae2eff2154361ee0a2c6fb5e /rest/rest-proxy.h | |
parent | a6216a8553235f1a6aa91ae6a0843b8ffb11d8f8 (diff) | |
download | librest-d6bd5d7b4c4b71e8c256729ae1954e3f27855a00.tar.gz |
RestProxyCall: Make sure _sync reliably sets error_out
Currently rest_proxy_call_sync (and everything else using
prepare_message) might return FALSE without setting @error at all. Add
two new error codes to indicate the possible problems and reliably
set the error if something went wrong.
Diffstat (limited to 'rest/rest-proxy.h')
-rw-r--r-- | rest/rest-proxy.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/rest/rest-proxy.h b/rest/rest-proxy.h index d341403..d882dea 100644 --- a/rest/rest-proxy.h +++ b/rest/rest-proxy.h @@ -97,6 +97,8 @@ struct _RestProxyClass { * @REST_PROXY_ERROR_SSL: SSL * @REST_PROXY_ERROR_IO: Input/Output * @REST_PROXY_ERROR_FAILED: Failure + * @REST_PROXY_ERROR_URL_INVALID: Invalid URL + * @REST_PROXY_ERROR_BINDING_REQUIRED: URL requires binding * @REST_PROXY_ERROR_HTTP_MULTIPLE_CHOICES: HTTP/Multiple choices * @REST_PROXY_ERROR_HTTP_MOVED_PERMANENTLY: HTTP/Moved permanently * @REST_PROXY_ERROR_HTTP_FOUND: HTTP/Found @@ -139,6 +141,8 @@ typedef enum { REST_PROXY_ERROR_SSL, REST_PROXY_ERROR_IO, REST_PROXY_ERROR_FAILED, + REST_PROXY_ERROR_URL_INVALID, + REST_PROXY_ERROR_BINDING_REQUIRED, REST_PROXY_ERROR_HTTP_MULTIPLE_CHOICES = 300, REST_PROXY_ERROR_HTTP_MOVED_PERMANENTLY = 301, |