]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-oauth2: Move oauth2_request_abort() to oauth2-request.c.
authorStephan Bosch <stephan.bosch@open-xchange.com>
Fri, 5 Jun 2020 19:11:20 +0000 (21:11 +0200)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Mon, 7 Dec 2020 08:59:28 +0000 (08:59 +0000)
src/lib-oauth2/oauth2-request.c
src/lib-oauth2/oauth2.c

index 0983e8dc3c6feae8ed4d7b1e3532c207a254e09f..58cebed07a633728c899f371b52046545ea1f086 100644 (file)
@@ -324,3 +324,12 @@ oauth2_passwd_grant_start(const struct oauth2_settings *set,
                                    pool, "POST", set->grant_url,
                                    payload, FALSE);
 }
+
+void oauth2_request_abort(struct oauth2_request **_req)
+{
+       struct oauth2_request *req = *_req;
+       *_req = NULL;
+
+       http_client_request_abort(&req->req);
+       oauth2_request_free_internal(req);
+}
index 42c212c986f2d9a8492ca490ae9efdd380828a57..37f533aa3fe7b9a9e0529f38f06f423b40675990 100644 (file)
@@ -34,15 +34,6 @@ int oauth2_json_tree_build(const buffer_t *json, struct json_tree **tree_r,
        return ret;
 }
 
-void oauth2_request_abort(struct oauth2_request **_req)
-{
-       struct oauth2_request *req = *_req;
-       *_req = NULL;
-
-       http_client_request_abort(&req->req);
-       oauth2_request_free_internal(req);
-}
-
 bool oauth2_valid_token(const char *token)
 {
        if (token == NULL || *token == '\0' || strpbrk(token, "\r\n") != NULL)