mirror of
https://github.com/haiwen/libsearpc.git
synced 2025-09-19 17:25:06 +00:00
Fixed a bug in named pipe transport.
This commit is contained in:
@@ -13,6 +13,6 @@ before_install:
|
||||
script:
|
||||
- ./configure
|
||||
- make -j8
|
||||
- make check
|
||||
- make check -j8
|
||||
notifications:
|
||||
email: false
|
||||
|
@@ -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);
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user