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
9c7e46f5
Commit
9c7e46f5
authored
9 years ago
by
Jan Tattermusch
Browse files
Options
Downloads
Patches
Plain Diff
use NULL for default host in grpc_channel_call_create
parent
9d67d8de
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/csharp/Grpc.Core/Channel.cs
+0
-31
0 additions, 31 deletions
src/csharp/Grpc.Core/Channel.cs
src/csharp/Grpc.Core/Internal/AsyncCall.cs
+1
-1
1 addition, 1 deletion
src/csharp/Grpc.Core/Internal/AsyncCall.cs
with
1 addition
and
32 deletions
src/csharp/Grpc.Core/Channel.cs
+
0
−
31
View file @
9c7e46f5
...
...
@@ -52,7 +52,6 @@ namespace Grpc.Core
readonly
GrpcEnvironment
environment
;
readonly
ChannelSafeHandle
handle
;
readonly
List
<
ChannelOption
>
options
;
readonly
string
target
;
bool
disposed
;
/// <summary>
...
...
@@ -81,7 +80,6 @@ namespace Grpc.Core
this
.
handle
=
ChannelSafeHandle
.
CreateInsecure
(
host
,
nativeChannelArgs
);
}
}
this
.
target
=
GetOverridenTarget
(
host
,
this
.
options
);
}
/// <summary>
...
...
@@ -163,14 +161,6 @@ namespace Grpc.Core
GC
.
SuppressFinalize
(
this
);
}
internal
string
Target
{
get
{
return
target
;
}
}
internal
ChannelSafeHandle
Handle
{
get
...
...
@@ -225,26 +215,5 @@ namespace Grpc.Core
// TODO(jtattermusch): it would be useful to also provide .NET/mono version.
return
string
.
Format
(
"grpc-csharp/{0}"
,
VersionInfo
.
CurrentVersion
);
}
/// <summary>
/// Look for SslTargetNameOverride option and return its value instead of originalTarget
/// if found.
/// </summary>
private
static
string
GetOverridenTarget
(
string
originalTarget
,
IEnumerable
<
ChannelOption
>
options
)
{
if
(
options
==
null
)
{
return
originalTarget
;
}
foreach
(
var
option
in
options
)
{
if
(
option
.
Type
==
ChannelOption
.
OptionType
.
String
&&
option
.
Name
==
ChannelOptions
.
SslTargetNameOverride
)
{
return
option
.
StringValue
;
}
}
return
originalTarget
;
}
}
}
This diff is collapsed.
Click to expand it.
src/csharp/Grpc.Core/Internal/AsyncCall.cs
+
1
−
1
View file @
9c7e46f5
...
...
@@ -67,7 +67,7 @@ namespace Grpc.Core.Internal
public
void
Initialize
(
Channel
channel
,
CompletionQueueSafeHandle
cq
,
string
methodName
,
Timespec
deadline
)
{
this
.
channel
=
channel
;
var
call
=
channel
.
Handle
.
CreateCall
(
channel
.
CompletionRegistry
,
cq
,
methodName
,
channel
.
Target
,
deadline
);
var
call
=
channel
.
Handle
.
CreateCall
(
channel
.
CompletionRegistry
,
cq
,
methodName
,
null
,
deadline
);
channel
.
Environment
.
DebugStats
.
ActiveClientCalls
.
Increment
();
InitializeInternal
(
call
);
}
...
...
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