diff options
author | NIIBE Yutaka <[email protected]> | 2023-06-01 04:40:05 +0000 |
---|---|---|
committer | NIIBE Yutaka <[email protected]> | 2023-06-01 04:40:05 +0000 |
commit | 592f6bb89ad160d81e5a658e45df590120df8b60 (patch) | |
tree | 73594f7549b271bf2e9e759032fc7745614c7f17 | |
parent | w32: Always include process information in HELLO. (diff) | |
download | libassuan-592f6bb89ad160d81e5a658e45df590120df8b60.tar.gz libassuan-592f6bb89ad160d81e5a658e45df590120df8b60.zip |
w32: Fix hello_line parsing for fd passing.
* tests/fdpassing.c (server_socket): Test with comma in the hello
line.
Signed-off-by: NIIBE Yutaka <[email protected]>
-rw-r--r-- | src/assuan-socket-connect.c | 2 | ||||
-rw-r--r-- | tests/fdpassing.c | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/assuan-socket-connect.c b/src/assuan-socket-connect.c index 182f9b3..b2f3c76 100644 --- a/src/assuan-socket-connect.c +++ b/src/assuan-socket-connect.c @@ -137,7 +137,7 @@ _assuan_connect_finalize (assuan_context_t ctx, assuan_fd_t fd, int process_id = -1; /* Parse the message: OK ..., process %i */ - line = strchr (line, ','); + line = strrchr (line, ','); if (line) { line = strchr (line + 1, ' '); diff --git a/tests/fdpassing.c b/tests/fdpassing.c index 438c8c5..eef447f 100644 --- a/tests/fdpassing.c +++ b/tests/fdpassing.c @@ -229,6 +229,7 @@ server_socket (const char *socketname) log_fatal ("assuan_init_socket_server failed: %s\n", gpg_strerror (rc)); assuan_set_sock_nonce (ctx, &socket_nonce); + assuan_set_hello_line (ctx, "Hello, this is a socket server."); server_common (ctx); } |