]> www.infradead.org Git - users/dwmw2/openconnect.git/commitdiff
Drop xmlpost argument to handle_auth_form()
authorDavid Woodhouse <David.Woodhouse@intel.com>
Fri, 31 May 2013 13:06:04 +0000 (14:06 +0100)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Fri, 31 May 2013 13:06:06 +0000 (14:06 +0100)
It's in vpninfo now anyway so doesn't need to be passed separately.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
auth.c
http.c
openconnect-internal.h

diff --git a/auth.c b/auth.c
index 34975195179b4230de421bcadbb0cc75d5293dd7..bff7c7ffff8b5ae4298a27518b16dfc028aa7f5d 100644 (file)
--- 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 a61e49385f5f62a9f45db989c4d63416dff1bcd9..bcc715d46ef5b46a1e49b7688d1f8a442ed11c8c 100644 (file)
--- 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)
index 267f38844481ee6db55d0a4b3c7a2ae4a1b3bbc1..ff99cf9a354c2d20ce86c1e4ac78e0b559fed5e4 100644 (file)
@@ -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);