Juniper/grpc-c

grpc_c_server_add_insecure_http2_port should return 0 on failure

Closed this issue · 1 comments

Hi,

Currently grpc_c_server_add_insecure_http2_port is returning 1 for failure:

int
grpc_c_server_add_insecure_http2_port (grpc_c_server_t server,
const char
addr)
{
if (server == NULL) return 1;

return grpc_server_add_insecure_http2_port(server->gcs_server, addr);

}

But according to grpc doc, it should return 0 on failure: (not the normal pattern)

"
GRPCAPI int grpc_server_add_insecure_http2_port ( grpc_server * server,
const char * addr
)

Add a HTTP2 over plaintext over tcp listener.

Returns bound port number on success, 0 on failure. REQUIRES: server not started
"

ajhai commented

Thanks for catching this. Fixed it with e3295da