1
0
mirror of https://github.com/haiwen/libsearpc.git synced 2025-09-19 09:12:39 +00:00

Fixed a bug in named pipe transport.

This commit is contained in:
Shuai Lin
2016-06-28 11:21:34 +08:00
parent 48a9c675ed
commit 25ce2aeceb
3 changed files with 7 additions and 2 deletions

View File

@@ -13,6 +13,6 @@ before_install:
script:
- ./configure
- make -j8
- make check
- make check -j8
notifications:
email: false

View File

@@ -220,11 +220,17 @@ static void* named_pipe_client_handler(void *arg)
g_debug ("start to serve on pipe client\n");
while (1) {
len = 0;
if (pipe_read_n(connfd, &len, sizeof(uint32_t)) < 0) {
g_warning("failed to read rpc request size: %s", strerror(errno));
break;
}
if (len == 0) {
g_debug("EOF reached, pipe connection lost");
break;
}
while (bufsize < len) {
bufsize *= 2;
buf = realloc(buf, bufsize);

View File

@@ -370,7 +370,6 @@ test_searpc__pipe_simple_call (void)
g_free (result);
/* error should return */
result = NULL;
result = searpc_client_call__string (client_with_pipe_transport, "get_substring", &error,
2, "string", "hello", "int", 10);
cl_assert (error->message);