From 68710f3967e0a80408227114034948cfdd10426e Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Tue, 14 Apr 2009 08:56:44 +0000 Subject: [PATCH] Format packet_flush(). git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@457 7dcaeef0-15fb-0310-b436-a5af3365683c --- libssh/packet.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/libssh/packet.c b/libssh/packet.c index cda83836..41cd54f9 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 */