change to int type

pull/13975/head
Dan Zhang 7 years ago
parent a6efb9cec7
commit 3742b724c9
  1. 6
      src/core/lib/iomgr/udp_server.cc
  2. 2
      src/core/lib/iomgr/udp_server.h
  3. 4
      test/core/iomgr/udp_server_test.cc

@ -285,7 +285,7 @@ static int bind_socket(grpc_socket_factory* socket_factory, int sockfd,
/* Prepare a recently-created socket for listening. */ /* Prepare a recently-created socket for listening. */
static int prepare_socket(grpc_socket_factory* socket_factory, int fd, static int prepare_socket(grpc_socket_factory* socket_factory, int fd,
const grpc_resolved_address* addr, const grpc_resolved_address* addr,
size_t rcv_buf_size, size_t snd_buf_size) { int rcv_buf_size, int snd_buf_size) {
grpc_resolved_address sockname_temp; grpc_resolved_address sockname_temp;
struct sockaddr* addr_ptr = (struct sockaddr*)addr->addr; struct sockaddr* addr_ptr = (struct sockaddr*)addr->addr;
@ -461,7 +461,7 @@ static void on_write(void* arg, grpc_error* error) {
static int add_socket_to_server(grpc_udp_server* s, int fd, static int add_socket_to_server(grpc_udp_server* s, int fd,
const grpc_resolved_address* addr, const grpc_resolved_address* addr,
size_t rcv_buf_size, size_t snd_buf_size, int rcv_buf_size, int snd_buf_size,
grpc_udp_server_start_cb start_cb, grpc_udp_server_start_cb start_cb,
grpc_udp_server_read_cb read_cb, grpc_udp_server_read_cb read_cb,
grpc_udp_server_write_cb write_cb, grpc_udp_server_write_cb write_cb,
@ -507,7 +507,7 @@ static int add_socket_to_server(grpc_udp_server* s, int fd,
int grpc_udp_server_add_port(grpc_udp_server* s, int grpc_udp_server_add_port(grpc_udp_server* s,
const grpc_resolved_address* addr, const grpc_resolved_address* addr,
size_t rcv_buf_size, size_t snd_buf_size, int rcv_buf_size, int snd_buf_size,
grpc_udp_server_start_cb start_cb, grpc_udp_server_start_cb start_cb,
grpc_udp_server_read_cb read_cb, grpc_udp_server_read_cb read_cb,
grpc_udp_server_write_cb write_cb, grpc_udp_server_write_cb write_cb,

@ -68,7 +68,7 @@ int grpc_udp_server_get_fd(grpc_udp_server* s, unsigned port_index);
all of the multiple socket port matching logic in one place */ all of the multiple socket port matching logic in one place */
int grpc_udp_server_add_port(grpc_udp_server* s, int grpc_udp_server_add_port(grpc_udp_server* s,
const grpc_resolved_address* addr, const grpc_resolved_address* addr,
size_t rcv_buf_size, size_t snd_buf_size, int rcv_buf_size, int snd_buf_size,
grpc_udp_server_start_cb start_cb, grpc_udp_server_start_cb start_cb,
grpc_udp_server_read_cb read_cb, grpc_udp_server_read_cb read_cb,
grpc_udp_server_write_cb write_cb, grpc_udp_server_write_cb write_cb,

@ -51,8 +51,8 @@ static int g_number_of_bytes_read = 0;
static int g_number_of_orphan_calls = 0; static int g_number_of_orphan_calls = 0;
static int g_number_of_starts = 0; static int g_number_of_starts = 0;
size_t rcv_buf_size = 1024; int rcv_buf_size = 1024;
size_t snd_buf_size = 1024; int snd_buf_size = 1024;
static void on_start(grpc_fd* emfd, void* user_data) { g_number_of_starts++; } static void on_start(grpc_fd* emfd, void* user_data) { g_number_of_starts++; }

Loading…
Cancel
Save