aboutsummaryrefslogtreecommitdiff
path: root/libssh/packet.c
diff options
context:
space:
mode:
authorAndreas Schneider <mail@cynapses.org>2009-04-14 08:58:11 +0000
committerAndreas Schneider <mail@cynapses.org>2009-04-14 08:58:11 +0000
commit749e95cbf14f73da507dfd5c6b247614d1d288f6 (patch)
tree4fe010c007f911ad8daee854e7dc2693e70b42b6 /libssh/packet.c
parent68710f3967e0a80408227114034948cfdd10426e (diff)
downloadlibssh-749e95cbf14f73da507dfd5c6b247614d1d288f6.tar.gz
libssh-749e95cbf14f73da507dfd5c6b247614d1d288f6.tar.xz
libssh-749e95cbf14f73da507dfd5c6b247614d1d288f6.zip
Format packet_write().
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@458 7dcaeef0-15fb-0310-b436-a5af3365683c
Diffstat (limited to 'libssh/packet.c')
-rw-r--r--libssh/packet.c25
1 files changed, 17 insertions, 8 deletions
diff --git a/libssh/packet.c b/libssh/packet.c
index 41cd54f..6e90306 100644
--- a/libssh/packet.c
+++ b/libssh/packet.c
@@ -412,14 +412,23 @@ int packet_flush(SSH_SESSION *session, int enforce_blocking) {
return ssh_socket_nonblocking_flush(session->socket);
}
-/* this function places the outgoing packet buffer into an outgoing socket buffer */
-static int packet_write(SSH_SESSION *session){
- int ret;
- enter_function();
- ssh_socket_write(session->socket,buffer_get(session->out_buffer),buffer_get_len(session->out_buffer));
- ret=packet_flush(session,0);
- leave_function();
- return ret;
+/*
+ * This function places the outgoing packet buffer into an outgoing
+ * socket buffer
+ */
+static int packet_write(SSH_SESSION *session) {
+ int rc = SSH_ERROR;
+
+ enter_function();
+
+ ssh_socket_write(session->socket,
+ buffer_get(session->out_buffer),
+ buffer_get_len(session->out_buffer));
+
+ rc = packet_flush(session, 0);
+
+ leave_function();
+ return rc;
}
static int packet_send2(SSH_SESSION *session){