From: David Woodhouse Date: Fri, 31 May 2013 13:06:04 +0000 (+0100) Subject: Drop xmlpost argument to handle_auth_form() X-Git-Tag: v5.01~9 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=d9cbf20aa4d5ec5542b578f4fcff9fcf9877a824;p=users%2Fdwmw2%2Fopenconnect.git Drop xmlpost argument to handle_auth_form() It's in vpninfo now anyway so doesn't need to be passed separately. Signed-off-by: David Woodhouse --- diff --git a/auth.c b/auth.c index 34975195..bff7c7ff 100644 --- a/auth.c +++ b/auth.c @@ -587,7 +587,7 @@ int parse_xml_response(struct openconnect_info *vpninfo, char *response, struct */ int handle_auth_form(struct openconnect_info *vpninfo, struct oc_auth_form *form, char *request_body, int req_len, const char **method, - const char **request_body_type, int xmlpost) + const char **request_body_type) { int ret; struct vpn_option *opt, *next; @@ -635,7 +635,7 @@ int handle_auth_form(struct openconnect_info *vpninfo, struct oc_auth_form *form if (ret) return ret; - ret = xmlpost ? + ret = vpninfo->xmlpost ? xmlpost_append_form_opts(vpninfo, form, request_body, req_len) : append_form_opts(vpninfo, form, request_body, req_len); if (!ret) { diff --git a/http.c b/http.c index a61e4938..bcc715d4 100644 --- a/http.c +++ b/http.c @@ -1176,7 +1176,7 @@ int openconnect_obtain_cookie(struct openconnect_info *vpninfo) while (1) { request_body[0] = 0; result = handle_auth_form(vpninfo, form, request_body, sizeof(request_body), - &method, &request_body_type, vpninfo->xmlpost); + &method, &request_body_type); if (result < 0 || result == 1) goto out; if (result == 2) diff --git a/openconnect-internal.h b/openconnect-internal.h index 267f3884..ff99cf9a 100644 --- a/openconnect-internal.h +++ b/openconnect-internal.h @@ -436,7 +436,7 @@ int parse_xml_response(struct openconnect_info *vpninfo, char *response, struct oc_auth_form **form, int *cert_rq); int handle_auth_form(struct openconnect_info *vpninfo, struct oc_auth_form *form, char *request_body, int req_len, const char **method, - const char **request_body_type, int xmlpost); + const char **request_body_type); void free_auth_form(struct oc_auth_form *form); int xmlpost_initial_req(struct openconnect_info *vpninfo, char *request_body, int req_len, int cert_fail); int prepare_stoken(struct openconnect_info *vpninfo);