diff options
Diffstat (limited to 'grpc/test/core/security/oauth2_utils.cc')
-rw-r--r-- | grpc/test/core/security/oauth2_utils.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/grpc/test/core/security/oauth2_utils.cc b/grpc/test/core/security/oauth2_utils.cc index 0885a1ac..536696b4 100644 --- a/grpc/test/core/security/oauth2_utils.cc +++ b/grpc/test/core/security/oauth2_utils.cc @@ -40,12 +40,13 @@ typedef struct { grpc_closure closure; } oauth2_request; -static void on_oauth2_response(void* arg, grpc_error* error) { +static void on_oauth2_response(void* arg, grpc_error_handle error) { oauth2_request* request = static_cast<oauth2_request*>(arg); char* token = nullptr; grpc_slice token_slice; if (error != GRPC_ERROR_NONE) { - gpr_log(GPR_ERROR, "Fetching token failed: %s", grpc_error_string(error)); + gpr_log(GPR_ERROR, "Fetching token failed: %s", + grpc_error_std_string(error).c_str()); } else { GPR_ASSERT(request->md_array.size == 1); token_slice = GRPC_MDVALUE(request->md_array.md[0]); @@ -64,7 +65,7 @@ static void on_oauth2_response(void* arg, grpc_error* error) { gpr_mu_unlock(request->mu); } -static void do_nothing(void* /*arg*/, grpc_error* /*error*/) {} +static void do_nothing(void* /*arg*/, grpc_error_handle /*error*/) {} char* grpc_test_fetch_oauth2_token_with_credentials( grpc_call_credentials* creds) { @@ -86,7 +87,7 @@ char* grpc_test_fetch_oauth2_token_with_credentials( GRPC_CLOSURE_INIT(&request.closure, on_oauth2_response, &request, grpc_schedule_on_exec_ctx); - grpc_error* error = GRPC_ERROR_NONE; + grpc_error_handle error = GRPC_ERROR_NONE; if (creds->get_request_metadata(&request.pops, null_ctx, &request.md_array, &request.closure, &error)) { // Synchronous result; invoke callback directly. |