Hi
I want to implement channel_exec_request_function, which capture the display
and write back to client.
the code:
while (fgets(buffer, sizeof(buffer), fp) != NULL) {
ssh_channel_write(chan, buffer, strlen(buffer));
memset(buffer, 0, sizeof(buffer));
}
Since there maybe many outputs, so I want to send it one line each time.
Here only the first write success, then all failed with return value -1.
I wonder does this mean I can write ONLY 1 line in this function? no matter how
much data, the libssh will handle it?
Or I miss something?
Thanks,
Yuanzhe