mirror of
https://github.com/libssh2/libssh2.git
synced 2025-07-29 13:01:14 +03:00
example: fix indentation follow-up
Fix long line and fix more indentations.
Follow-up to 9e896e1b80
This commit is contained in:
@ -235,7 +235,7 @@ int main(int argc, char *argv[])
|
|||||||
shost, sport, remote_desthost, remote_destport);
|
shost, sport, remote_desthost, remote_destport);
|
||||||
|
|
||||||
channel = libssh2_channel_direct_tcpip_ex(session, remote_desthost,
|
channel = libssh2_channel_direct_tcpip_ex(session, remote_desthost,
|
||||||
remote_destport, shost, sport);
|
remote_destport, shost, sport);
|
||||||
if(!channel) {
|
if(!channel) {
|
||||||
fprintf(stderr, "Could not open the direct-tcpip channel.\n"
|
fprintf(stderr, "Could not open the direct-tcpip channel.\n"
|
||||||
"(Note that this can be a problem at the server."
|
"(Note that this can be a problem at the server."
|
||||||
|
@ -195,7 +195,8 @@ int main(int argc, char *argv[])
|
|||||||
remote_listenhost, remote_wantport);
|
remote_listenhost, remote_wantport);
|
||||||
|
|
||||||
listener = libssh2_channel_forward_listen_ex(session, remote_listenhost,
|
listener = libssh2_channel_forward_listen_ex(session, remote_listenhost,
|
||||||
remote_wantport, &remote_listenport, 1);
|
remote_wantport,
|
||||||
|
&remote_listenport, 1);
|
||||||
if(!listener) {
|
if(!listener) {
|
||||||
fprintf(stderr, "Could not start the tcpip-forward listener.\n"
|
fprintf(stderr, "Could not start the tcpip-forward listener.\n"
|
||||||
"(Note that this can be a problem at the server."
|
"(Note that this can be a problem at the server."
|
||||||
@ -237,7 +238,8 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
fprintf(stderr, "Forwarding connection from remote %s:%d to local %s:%d\n",
|
fprintf(stderr, "Forwarding connection from remote %s:%d to local %s:%d\n",
|
||||||
remote_listenhost, remote_listenport, local_destip, local_destport);
|
remote_listenhost, remote_listenport,
|
||||||
|
local_destip, local_destport);
|
||||||
|
|
||||||
/* Must use non-blocking IO hereafter due to the current libssh2 API */
|
/* Must use non-blocking IO hereafter due to the current libssh2 API */
|
||||||
libssh2_session_set_blocking(session, 0);
|
libssh2_session_set_blocking(session, 0);
|
||||||
|
Reference in New Issue
Block a user