aboutsummaryrefslogtreecommitdiff
path: root/libssh/packet.c
diff options
context:
space:
mode:
authorAndreas Schneider <mail@cynapses.org>2009-04-14 08:56:44 +0000
committerAndreas Schneider <mail@cynapses.org>2009-04-14 08:56:44 +0000
commit68710f3967e0a80408227114034948cfdd10426e (patch)
tree99df5afbf114d1a47f185759ba46b92dbbaf545a /libssh/packet.c
parent22b3122c6c297f7329100543afc7e712b3dc91d5 (diff)
downloadlibssh-68710f3967e0a80408227114034948cfdd10426e.tar.gz
libssh-68710f3967e0a80408227114034948cfdd10426e.tar.xz
libssh-68710f3967e0a80408227114034948cfdd10426e.zip
Format packet_flush().
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@457 7dcaeef0-15fb-0310-b436-a5af3365683c
Diffstat (limited to 'libssh/packet.c')
-rw-r--r--libssh/packet.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/libssh/packet.c b/libssh/packet.c
index cda8383..41cd54f 100644
--- a/libssh/packet.c
+++ b/libssh/packet.c
@@ -398,14 +398,18 @@ int packet_translate(SSH_SESSION *session) {
return SSH_OK;
}
-/* Write the the bufferized output. If the session is blocking, or enforce_blocking
- * is set, the call may block. Otherwise, it won't block.
- * return SSH°OK if everything has been sent, SSH_AGAIN if there are still things
- * to send on buffer, SSH_ERROR if there is an error. */
-int packet_flush(SSH_SESSION *session, int enforce_blocking){
- if(enforce_blocking || session->blocking)
- return ssh_socket_blocking_flush(session->socket);
- return ssh_socket_nonblocking_flush(session->socket);
+/*
+ * Write the the bufferized output. If the session is blocking, or
+ * enforce_blocking is set, the call may block. Otherwise, it won't block.
+ * Return SSH_OK if everything has been sent, SSH_AGAIN if there are still
+ * things to send on buffer, SSH_ERROR if there is an error.
+ */
+int packet_flush(SSH_SESSION *session, int enforce_blocking) {
+ if (enforce_blocking || session->blocking) {
+ return ssh_socket_blocking_flush(session->socket);
+ }
+
+ return ssh_socket_nonblocking_flush(session->socket);
}
/* this function places the outgoing packet buffer into an outgoing socket buffer */