From 13ec74481ce0137f7a60b3256cc4840073c77efa Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Tue, 7 Feb 2012 10:15:57 +0100 Subject: common: Replace macro based function calls by using DEFAULT_ERRSOURCE. * common/dns-cert.h (get_dns_cert): Remove macro. * common/dns-cert.c (_get_dns_cert): Rename to get_dns_cert. Replace arg ERRSOURCE by global DEFAULT_ERRSOURCE. * common/http.h (http_parse_uri, http_raw_connect, http_open) (http_open_document, http_wait_response): Remove macros. * common/http.c (_http_parse_uri, _http_raw_connect, _http_open) (_http_open_document, _http_wait_response): Remove underscore from symbols. Replace args ERRSOURCE by global DEFAULT_ERRSOURCE. * common/ssh-utils.h (ssh_get_fingerprint) (ssh_get_fingerprint_string): Remove macros. * common/ssh-utils.h (_ssh_get_fingerprint) (_ssh_get_fingerprint_string): Remove underscore from symbols. Replace args ERRSOURCE by global DEFAULT_ERRSOURCE. * common/tlv.h (parse_ber_header, parse_sexp): Remove macros. * common/tlv.c: Include util.h. (_parse_ber_header, _parse_sexp): Remove underscore from symbols. Replace args ERRSOURCE by global DEFAULT_ERRSOURCE. --- common/http.h | 59 +++++++++++++++++++++++------------------------------------ 1 file changed, 23 insertions(+), 36 deletions(-) (limited to 'common/http.h') diff --git a/common/http.h b/common/http.h index 7a11b84f3..74c29105a 100644 --- a/common/http.h +++ b/common/http.h @@ -74,51 +74,38 @@ typedef struct http_context_s *http_t; void http_register_tls_callback (gpg_error_t (*cb) (http_t, void *, int)); -gpg_error_t _http_parse_uri (parsed_uri_t *ret_uri, const char *uri, - int no_scheme_check, gpg_err_source_t errsource); -#define http_parse_uri(a,b,c) \ - _http_parse_uri ((a), (b), (c), GPG_ERR_SOURCE_DEFAULT) +gpg_error_t http_parse_uri (parsed_uri_t *ret_uri, const char *uri, + int no_scheme_check); void http_release_parsed_uri (parsed_uri_t uri); -gpg_error_t _http_raw_connect (http_t *r_hd, - const char *server, unsigned short port, - unsigned int flags, const char *srvtag, - gpg_err_source_t errsource); -#define http_raw_connect(a,b,c,d,e) \ - _http_raw_connect ((a),(b),(c),(d),(e), GPG_ERR_SOURCE_DEFAULT) - -gpg_error_t _http_open (http_t *r_hd, http_req_t reqtype, - const char *url, - const char *auth, - unsigned int flags, - const char *proxy, - void *tls_context, - const char *srvtag, - strlist_t headers, - gpg_err_source_t errsource); -#define http_open(a,b,c,d,e,f,g,h,i) \ - _http_open ((a),(b),(c),(d),(e),(f),(g),(h),(i), GPG_ERR_SOURCE_DEFAULT) +gpg_error_t http_raw_connect (http_t *r_hd, + const char *server, unsigned short port, + unsigned int flags, const char *srvtag); + +gpg_error_t http_open (http_t *r_hd, http_req_t reqtype, + const char *url, + const char *auth, + unsigned int flags, + const char *proxy, + void *tls_context, + const char *srvtag, + strlist_t headers); void http_start_data (http_t hd); -gpg_error_t _http_wait_response (http_t hd, gpg_err_source_t errsource); -#define http_wait_response(a) \ - _http_wait_response ((a), GPG_ERR_SOURCE_DEFAULT) +gpg_error_t http_wait_response (http_t hd); void http_close (http_t hd, int keep_read_stream); -gpg_error_t _http_open_document (http_t *r_hd, - const char *document, - const char *auth, - unsigned int flags, - const char *proxy, - void *tls_context, - const char *srvtag, - strlist_t headers, - gpg_err_source_t errsource); -#define http_open_document(a,b,c,d,e,f,g,h) \ - _http_open_document ((a),(b),(c),(d),(e),(f),(g),(h), GPG_ERR_SOURCE_DEFAULT) +gpg_error_t http_open_document (http_t *r_hd, + const char *document, + const char *auth, + unsigned int flags, + const char *proxy, + void *tls_context, + const char *srvtag, + strlist_t headers); estream_t http_get_read_ptr (http_t hd); estream_t http_get_write_ptr (http_t hd); -- cgit v1.2.3