mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-10 10:26:47 +09:00
tests/pkd: input test payload buffer
Move the pkd test payload buffer into the arguments struct, to make way for parameterizing the payload using command-line options. Signed-off-by: Jon Simons <jon@jonsimons.org> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
committed by
Andreas Schneider
parent
104c696bca
commit
410f100968
@@ -368,9 +368,9 @@ static int pkd_exec_hello(int fd, struct pkd_daemon_args *args)
|
||||
goto out;
|
||||
}
|
||||
|
||||
rc = ssh_channel_write(c, "hello\n", 6); /* XXX: customizable payloads */
|
||||
if (rc != 6) {
|
||||
pkderr("ssh_channel_write partial (%d)\n", rc);
|
||||
rc = ssh_channel_write(c, args->payload.buf, args->payload.len);
|
||||
if (rc != args->payload.len) {
|
||||
pkderr("ssh_channel_write partial (%d != %zd)\n", rc, args->payload.len);
|
||||
}
|
||||
|
||||
rc = ssh_channel_request_send_exit_status(c, 0);
|
||||
|
||||
Reference in New Issue
Block a user