From febd4273254b7af84b1ef494a3d1a9683fa4009d Mon Sep 17 00:00:00 2001 From: Stephan Bosch Date: Fri, 5 Jun 2020 21:11:20 +0200 Subject: [PATCH] lib-oauth2: Move oauth2_request_abort() to oauth2-request.c. --- src/lib-oauth2/oauth2-request.c | 9 +++++++++ src/lib-oauth2/oauth2.c | 9 --------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/lib-oauth2/oauth2-request.c b/src/lib-oauth2/oauth2-request.c index 0983e8dc3c..58cebed07a 100644 --- a/src/lib-oauth2/oauth2-request.c +++ b/src/lib-oauth2/oauth2-request.c @@ -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); +} diff --git a/src/lib-oauth2/oauth2.c b/src/lib-oauth2/oauth2.c index 42c212c986..37f533aa3f 100644 --- a/src/lib-oauth2/oauth2.c +++ b/src/lib-oauth2/oauth2.c @@ -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) -- 2.47.3