]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-oauth2: Rename oauth2_parse_json() to oauth2_request_parse_json().
authorStephan Bosch <stephan.bosch@open-xchange.com>
Fri, 5 Jun 2020 19:06:30 +0000 (21:06 +0200)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Mon, 7 Dec 2020 08:59:28 +0000 (08:59 +0000)
src/lib-oauth2/oauth2-private.h
src/lib-oauth2/oauth2-request.c
src/lib-oauth2/test-oauth2-json.c

index 15539daedc6cc57f8c29ecdea0c3221995152394..ef0f48cc71ec45501afc3b428dfc0e1a51c4a1df 100644 (file)
@@ -35,7 +35,7 @@ void oauth2_request_set_headers(struct oauth2_request *req,
 
 void oauth2_request_free_internal(struct oauth2_request *req);
 
-void oauth2_parse_json(struct oauth2_request *req);
+void oauth2_request_parse_json(struct oauth2_request *req);
 int oauth2_json_tree_build(const buffer_t *json, struct json_tree **tree_r,
                           const char **error_r);
 
index 96d37abd394479013f5decee29bd9bc0d8f168b1..082652d88c0ecfaafc56f3dbe0020d2eff2060fc 100644 (file)
@@ -78,7 +78,7 @@ oauth2_request_continue(struct oauth2_request *req, const char *error)
        oauth2_request_callback(req, &res);
 }
 
-void oauth2_parse_json(struct oauth2_request *req)
+void oauth2_request_parse_json(struct oauth2_request *req)
 {
        enum json_type type;
        const char *token, *error;
@@ -155,8 +155,8 @@ oauth2_request_response(const struct http_response *response,
        p_array_init(&req->fields, req->pool, 1);
        req->parser = json_parser_init(req->is);
        req->json_parsed_cb = oauth2_request_continue;
-       req->io = io_add_istream(req->is, oauth2_parse_json, req);
-       oauth2_parse_json(req);
+       req->io = io_add_istream(req->is, oauth2_request_parse_json, req);
+       oauth2_request_parse_json(req);
 }
 
 void oauth2_request_set_headers(struct oauth2_request *req,
index 5eb1323f859b6a30d2fed22052d979d35fe5c416..87caedcb284ee5d37eca8ae1f1db90fae572125d 100644 (file)
@@ -73,7 +73,7 @@ static void test_oauth2_json_valid(void)
        /* Parse the JSON response */
        for (pos = 0; pos <= strlen(test_input); pos +=2) {
                test_istream_set_size(req->is, pos);
-               oauth2_parse_json(req);
+               oauth2_request_parse_json(req);
                if (req->is == NULL)
                        break;
        }