Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Grpc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tci-gateway-module
Grpc
Commits
fc433cda
Commit
fc433cda
authored
9 years ago
by
jboeuf
Browse files
Options
Downloads
Plain Diff
Merge pull request #2848 from yang-g/default_creds_fix
Fix gce detection
parents
6aff647b
6a5494a5
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/core/security/google_default_credentials.c
+4
-2
4 additions, 2 deletions
src/core/security/google_default_credentials.c
with
4 additions
and
2 deletions
src/core/security/google_default_credentials.c
+
4
−
2
View file @
fc433cda
...
...
@@ -84,6 +84,8 @@ static void on_compute_engine_detection_http_response(
gpr_mu_unlock
(
GRPC_POLLSET_MU
(
&
detector
->
pollset
));
}
static
void
destroy_pollset
(
void
*
p
)
{
grpc_pollset_destroy
(
p
);
}
static
int
is_stack_running_on_compute_engine
(
void
)
{
compute_engine_detector
detector
;
grpc_httpcli_request
request
;
...
...
@@ -114,12 +116,12 @@ static int is_stack_running_on_compute_engine(void) {
while
(
!
detector
.
is_done
)
{
grpc_pollset_worker
worker
;
grpc_pollset_work
(
&
detector
.
pollset
,
&
worker
,
gpr_inf_future
(
GPR_CLOCK_
REALTIME
));
gpr_inf_future
(
GPR_CLOCK_
MONOTONIC
));
}
gpr_mu_unlock
(
GRPC_POLLSET_MU
(
&
detector
.
pollset
));
grpc_httpcli_context_destroy
(
&
context
);
grpc_pollset_
destroy
(
&
detector
.
pollset
);
grpc_pollset_
shutdown
(
&
detector
.
pollset
,
destroy_pollset
,
&
detector
.
pollset
);
return
detector
.
success
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment