1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-08-07 08:02:55 +03:00

src: Remove enter_function() and leave_function().

This commit is contained in:
Andreas Schneider
2013-07-14 13:31:24 +02:00
parent 0d3deeec10
commit c64ec43eef
22 changed files with 267 additions and 494 deletions

View File

@@ -108,7 +108,6 @@ int ssh_packet_socket_callback1(const void *data, size_t receivedlen, void *user
uint32_t crc;
uint32_t len;
ssh_session session=(ssh_session)user;
enter_function();
switch (session->packet_state){
case PACKET_STATE_INIT:
@@ -126,7 +125,6 @@ int ssh_packet_socket_callback1(const void *data, size_t receivedlen, void *user
}
/* must have at least enough bytes for size */
if(receivedlen < sizeof(uint32_t)){
leave_function();
return 0;
}
memcpy(&len,data,sizeof(uint32_t));
@@ -152,7 +150,6 @@ int ssh_packet_socket_callback1(const void *data, size_t receivedlen, void *user
to_be_read = len + padding;
if(to_be_read + processed > receivedlen){
/* wait for rest of packet */
leave_function();
return processed;
}
/* it is _not_ possible that to_be_read be < 8. */
@@ -236,7 +233,7 @@ int ssh_packet_socket_callback1(const void *data, size_t receivedlen, void *user
receivedlen - processed,user);
processed += rc;
}
leave_function();
return processed;
case PACKET_STATE_PROCESSING:
SSH_LOG(SSH_LOG_RARE, "Nested packet processing. Delaying.");
@@ -245,7 +242,7 @@ int ssh_packet_socket_callback1(const void *data, size_t receivedlen, void *user
error:
session->session_state=SSH_SESSION_STATE_ERROR;
leave_function();
return processed;
}
@@ -260,7 +257,6 @@ int packet_send1(ssh_session session) {
uint32_t crc;
uint8_t padding;
enter_function();
SSH_LOG(SSH_LOG_PACKET,"Sending a %d bytes long packet",currentlen);
/* TODO FIXME
@@ -323,7 +319,7 @@ int packet_send1(ssh_session session) {
rc = SSH_ERROR;
}
error:
leave_function();
return rc; /* SSH_OK, AGAIN or ERROR */
}