From: Stephan Bosch Date: Fri, 5 Jun 2020 19:06:30 +0000 (+0200) Subject: lib-oauth2: Rename oauth2_parse_json() to oauth2_request_parse_json(). X-Git-Tag: 2.3.14.rc1~244 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6d0f74d0db0c4b2bdb13f71a2ffdc564aaa5f6f9;p=thirdparty%2Fdovecot%2Fcore.git lib-oauth2: Rename oauth2_parse_json() to oauth2_request_parse_json(). --- diff --git a/src/lib-oauth2/oauth2-private.h b/src/lib-oauth2/oauth2-private.h index 15539daedc..ef0f48cc71 100644 --- a/src/lib-oauth2/oauth2-private.h +++ b/src/lib-oauth2/oauth2-private.h @@ -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); diff --git a/src/lib-oauth2/oauth2-request.c b/src/lib-oauth2/oauth2-request.c index 96d37abd39..082652d88c 100644 --- a/src/lib-oauth2/oauth2-request.c +++ b/src/lib-oauth2/oauth2-request.c @@ -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, diff --git a/src/lib-oauth2/test-oauth2-json.c b/src/lib-oauth2/test-oauth2-json.c index 5eb1323f85..87caedcb28 100644 --- a/src/lib-oauth2/test-oauth2-json.c +++ b/src/lib-oauth2/test-oauth2-json.c @@ -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; }