remove all libssh2pack_t leftovers
This commit is contained in:
parent
f1e010f5d4
commit
fba3877ed8
@ -721,7 +721,7 @@ libssh2_channel_forward_cancel(LIBSSH2_LISTENER *listener)
|
|||||||
static LIBSSH2_CHANNEL *
|
static LIBSSH2_CHANNEL *
|
||||||
channel_forward_accept(LIBSSH2_LISTENER *listener)
|
channel_forward_accept(LIBSSH2_LISTENER *listener)
|
||||||
{
|
{
|
||||||
libssh2pack_t rc;
|
int rc;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
rc = _libssh2_transport_read(listener->session);
|
rc = _libssh2_transport_read(listener->session);
|
||||||
@ -1288,7 +1288,7 @@ _libssh2_channel_process_startup(LIBSSH2_CHANNEL *channel,
|
|||||||
static const unsigned char reply_codes[3] =
|
static const unsigned char reply_codes[3] =
|
||||||
{ SSH_MSG_CHANNEL_SUCCESS, SSH_MSG_CHANNEL_FAILURE, 0 };
|
{ SSH_MSG_CHANNEL_SUCCESS, SSH_MSG_CHANNEL_FAILURE, 0 };
|
||||||
unsigned long data_len;
|
unsigned long data_len;
|
||||||
libssh2pack_t rc;
|
int rc;
|
||||||
|
|
||||||
if (channel->process_state == libssh2_NB_state_idle) {
|
if (channel->process_state == libssh2_NB_state_idle) {
|
||||||
/* 10 = packet_type(1) + channel(4) + request_len(4) + want_reply(1) */
|
/* 10 = packet_type(1) + channel(4) + request_len(4) + want_reply(1) */
|
||||||
@ -1710,7 +1710,7 @@ static ssize_t channel_read(LIBSSH2_CHANNEL *channel, int stream_id,
|
|||||||
char *buf, size_t buflen)
|
char *buf, size_t buflen)
|
||||||
{
|
{
|
||||||
LIBSSH2_SESSION *session = channel->session;
|
LIBSSH2_SESSION *session = channel->session;
|
||||||
libssh2pack_t rc;
|
int rc;
|
||||||
int bytes_read = 0;
|
int bytes_read = 0;
|
||||||
int bytes_want;
|
int bytes_want;
|
||||||
int unlink_packet;
|
int unlink_packet;
|
||||||
@ -1954,7 +1954,7 @@ _libssh2_channel_write(LIBSSH2_CHANNEL *channel, int stream_id,
|
|||||||
const char *buf, size_t buflen)
|
const char *buf, size_t buflen)
|
||||||
{
|
{
|
||||||
LIBSSH2_SESSION *session = channel->session;
|
LIBSSH2_SESSION *session = channel->session;
|
||||||
libssh2pack_t rc;
|
int rc;
|
||||||
ssize_t wrote = 0; /* counter for this specific this call */
|
ssize_t wrote = 0; /* counter for this specific this call */
|
||||||
|
|
||||||
if (channel->write_state == libssh2_NB_state_idle) {
|
if (channel->write_state == libssh2_NB_state_idle) {
|
||||||
|
@ -865,7 +865,7 @@ struct _LIBSSH2_SESSION
|
|||||||
libssh2_nonblocking_states fullpacket_state;
|
libssh2_nonblocking_states fullpacket_state;
|
||||||
int fullpacket_macstate;
|
int fullpacket_macstate;
|
||||||
int fullpacket_payload_len;
|
int fullpacket_payload_len;
|
||||||
libssh2pack_t fullpacket_packet_type;
|
int fullpacket_packet_type;
|
||||||
|
|
||||||
/* State variables used in libssh2_sftp_init() */
|
/* State variables used in libssh2_sftp_init() */
|
||||||
libssh2_nonblocking_states sftpInit_state;
|
libssh2_nonblocking_states sftpInit_state;
|
||||||
@ -1166,7 +1166,7 @@ int _libssh2_wait_socket(LIBSSH2_SESSION *session);
|
|||||||
#define PACKET_FAIL LIBSSH2_ERROR_SOCKET_NONE
|
#define PACKET_FAIL LIBSSH2_ERROR_SOCKET_NONE
|
||||||
#define PACKET_NONE LIBSSH2_ERROR_NONE
|
#define PACKET_NONE LIBSSH2_ERROR_NONE
|
||||||
|
|
||||||
libssh2pack_t _libssh2_packet_read(LIBSSH2_SESSION * session);
|
int _libssh2_packet_read(LIBSSH2_SESSION * session);
|
||||||
|
|
||||||
int _libssh2_packet_ask(LIBSSH2_SESSION * session, unsigned char packet_type,
|
int _libssh2_packet_ask(LIBSSH2_SESSION * session, unsigned char packet_type,
|
||||||
unsigned char **data, unsigned long *data_len,
|
unsigned char **data, unsigned long *data_len,
|
||||||
|
@ -990,7 +990,7 @@ _libssh2_packet_require(LIBSSH2_SESSION * session, unsigned char packet_type,
|
|||||||
}
|
}
|
||||||
|
|
||||||
while (session->socket_state == LIBSSH2_SOCKET_CONNECTED) {
|
while (session->socket_state == LIBSSH2_SOCKET_CONNECTED) {
|
||||||
libssh2pack_t ret = _libssh2_transport_read(session);
|
int ret = _libssh2_transport_read(session);
|
||||||
if (ret == PACKET_EAGAIN) {
|
if (ret == PACKET_EAGAIN) {
|
||||||
return PACKET_EAGAIN;
|
return PACKET_EAGAIN;
|
||||||
} else if (ret == 0) {
|
} else if (ret == 0) {
|
||||||
|
@ -95,10 +95,10 @@ debugdump(LIBSSH2_SESSION * session,
|
|||||||
|
|
||||||
/* decrypt() decrypts 'len' bytes from 'source' to 'dest'.
|
/* decrypt() decrypts 'len' bytes from 'source' to 'dest'.
|
||||||
*
|
*
|
||||||
* returns PACKET_NONE on success and PACKET_FAIL on failure
|
* returns 0 on success and negative on failure
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static libssh2pack_t
|
static int
|
||||||
decrypt(LIBSSH2_SESSION * session, unsigned char *source,
|
decrypt(LIBSSH2_SESSION * session, unsigned char *source,
|
||||||
unsigned char *dest, int len)
|
unsigned char *dest, int len)
|
||||||
{
|
{
|
||||||
@ -134,7 +134,7 @@ decrypt(LIBSSH2_SESSION * session, unsigned char *source,
|
|||||||
* fullpacket() gets called when a full packet has been received and properly
|
* fullpacket() gets called when a full packet has been received and properly
|
||||||
* collected.
|
* collected.
|
||||||
*/
|
*/
|
||||||
static libssh2pack_t
|
static int
|
||||||
fullpacket(LIBSSH2_SESSION * session, int encrypted /* 1 or 0 */ )
|
fullpacket(LIBSSH2_SESSION * session, int encrypted /* 1 or 0 */ )
|
||||||
{
|
{
|
||||||
unsigned char macbuf[MAX_MACSIZE];
|
unsigned char macbuf[MAX_MACSIZE];
|
||||||
@ -245,12 +245,10 @@ fullpacket(LIBSSH2_SESSION * session, int encrypted /* 1 or 0 */ )
|
|||||||
/*
|
/*
|
||||||
* _libssh2_transport_read
|
* _libssh2_transport_read
|
||||||
*
|
*
|
||||||
* Collect a packet into the input brigade block only controls whether or not
|
* Collect a packet into the input queue.
|
||||||
* to wait for a packet to start.
|
|
||||||
*
|
*
|
||||||
* Returns packet type added to input brigade (PACKET_NONE if nothing added),
|
* Returns packet type added to input queue (0 if nothing added), or a
|
||||||
* or PACKET_FAIL on failure and PACKET_EAGAIN if it couldn't process a full
|
* negative error number.
|
||||||
* packet.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -572,7 +570,7 @@ int _libssh2_transport_read(LIBSSH2_SESSION * session)
|
|||||||
return PACKET_FAIL; /* we never reach this point */
|
return PACKET_FAIL; /* we never reach this point */
|
||||||
}
|
}
|
||||||
|
|
||||||
static libssh2pack_t
|
static int
|
||||||
send_existing(LIBSSH2_SESSION * session, unsigned char *data,
|
send_existing(LIBSSH2_SESSION * session, unsigned char *data,
|
||||||
unsigned long data_len, ssize_t * ret)
|
unsigned long data_len, ssize_t * ret)
|
||||||
{
|
{
|
||||||
@ -665,7 +663,7 @@ _libssh2_transport_write(LIBSSH2_SESSION * session, unsigned char *data,
|
|||||||
int encrypted;
|
int encrypted;
|
||||||
int i;
|
int i;
|
||||||
ssize_t ret;
|
ssize_t ret;
|
||||||
libssh2pack_t rc;
|
int rc;
|
||||||
unsigned char *orgdata = data;
|
unsigned char *orgdata = data;
|
||||||
unsigned long orgdata_len = data_len;
|
unsigned long orgdata_len = data_len;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user