Skip to content

Commit

Permalink
Allow arbitrary bytes as upstream name of grpc call
Browse files Browse the repository at this point in the history
Signed-off-by: Michał Krasnoborski <[email protected]>
  • Loading branch information
krdln committed Sep 16, 2021
1 parent 375a366 commit b0c311e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/hostcalls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -793,7 +793,7 @@ extern "C" {
}

pub fn dispatch_grpc_call(
upstream_name: &str,
upstream: &[u8],
service_name: &str,
method_name: &str,
initial_metadata: Vec<(&str, &[u8])>,
Expand All @@ -804,8 +804,8 @@ pub fn dispatch_grpc_call(
let serialized_initial_metadata = utils::serialize_map_bytes(initial_metadata);
unsafe {
match proxy_grpc_call(
upstream_name.as_ptr(),
upstream_name.len(),
upstream.as_ptr(),
upstream.len(),
service_name.as_ptr(),
service_name.len(),
method_name.as_ptr(),
Expand Down
4 changes: 2 additions & 2 deletions src/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,15 +116,15 @@ pub trait Context {

fn dispatch_grpc_call(
&self,
upstream_name: &str,
upstream: &[u8],
service_name: &str,
method_name: &str,
initial_metadata: Vec<(&str, &[u8])>,
message: Option<&[u8]>,
timeout: Duration,
) -> Result<u32, Status> {
hostcalls::dispatch_grpc_call(
upstream_name,
upstream,
service_name,
method_name,
initial_metadata,
Expand Down

0 comments on commit b0c311e

Please sign in to comment.