aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/channels.c7
-rw-r--r--src/session.c5
2 files changed, 11 insertions, 1 deletions
diff --git a/src/channels.c b/src/channels.c
index c9d9753..16c7c60 100644
--- a/src/channels.c
+++ b/src/channels.c
@@ -1211,6 +1211,8 @@ error:
}
/* this termination function waits for a window growing condition */
+#if WITH_SERVER
+#else
static int ssh_channel_waitwindow_termination(void *c){
ssh_channel channel = (ssh_channel) c;
if (channel->remote_window > 0 ||
@@ -1219,7 +1221,7 @@ static int ssh_channel_waitwindow_termination(void *c){
else
return 0;
}
-
+#endif
/**
* @internal
* @brief Flushes a channel (and its session) until the output buffer
@@ -1298,9 +1300,12 @@ int channel_write_common(ssh_channel channel, const void *data,
/* nothing can be written */
ssh_log(session, SSH_LOG_PROTOCOL,
"Wait for a growing window message...");
+#if WITH_SERVER
+#else
rc = ssh_handle_packets_termination(session, SSH_TIMEOUT_USER,
ssh_channel_waitwindow_termination,channel);
if (rc == SSH_ERROR || !ssh_channel_waitwindow_termination(channel))
+#endif
goto out;
continue;
}
diff --git a/src/session.c b/src/session.c
index 1e81edc..09da62b 100644
--- a/src/session.c
+++ b/src/session.c
@@ -330,12 +330,17 @@ int ssh_blocking_flush(ssh_session session, int timeout){
return SSH_ERROR;
enter_function();
+#ifdef WITH_SERVER
+ (void)timeout;
+#else
rc = ssh_handle_packets_termination(session, timeout,
ssh_flush_termination, session);
if (rc == SSH_ERROR)
goto end;
+#endif
if (!ssh_flush_termination(session))
rc = SSH_AGAIN;
+ goto end;
end:
leave_function();
return rc;