mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-04 20:30:38 +09:00
Format packet_write().
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@458 7dcaeef0-15fb-0310-b436-a5af3365683c
This commit is contained in:
@@ -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){
|
||||
|
||||
Reference in New Issue
Block a user