aboutsummaryrefslogtreecommitdiff
path: root/libssh/socket.c
diff options
context:
space:
mode:
authorAndreas Schneider <mail@cynapses.org>2009-07-25 23:19:41 +0200
committerAndreas Schneider <mail@cynapses.org>2009-07-25 23:19:41 +0200
commit28b5d0f8751a8979231b3d2e6ccf182256219d52 (patch)
tree30618b26293838a766e56664ffcdbc0d583fb63c /libssh/socket.c
parentba217dec1c7de84b1e51807660ccd2cc86f8dde4 (diff)
downloadlibssh-28b5d0f8751a8979231b3d2e6ccf182256219d52.tar.gz
libssh-28b5d0f8751a8979231b3d2e6ccf182256219d52.tar.xz
libssh-28b5d0f8751a8979231b3d2e6ccf182256219d52.zip
Switch completly to stdint types.
Diffstat (limited to 'libssh/socket.c')
-rw-r--r--libssh/socket.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/libssh/socket.c b/libssh/socket.c
index d1869bbe..5d5f27f9 100644
--- a/libssh/socket.c
+++ b/libssh/socket.c
@@ -182,7 +182,7 @@ int ssh_socket_is_open(struct socket *s) {
/* \internal
* \brief read len bytes from socket into buffer
*/
-static int ssh_socket_unbuffered_read(struct socket *s, void *buffer, u32 len) {
+static int ssh_socket_unbuffered_read(struct socket *s, void *buffer, uint32_t len) {
int rc = -1;
if (s->data_except) {
@@ -208,7 +208,7 @@ static int ssh_socket_unbuffered_read(struct socket *s, void *buffer, u32 len) {
* \brief writes len bytes from buffer to socket
*/
static int ssh_socket_unbuffered_write(struct socket *s, const void *buffer,
- u32 len) {
+ uint32_t len) {
int w = -1;
if (s->data_except) {
@@ -256,10 +256,10 @@ void ssh_socket_fd_set(struct socket *s, fd_set *set, int *fd_max) {
/** \internal
* \brief reads blocking until len bytes have been read
*/
-int ssh_socket_completeread(struct socket *s, void *buffer, u32 len) {
+int ssh_socket_completeread(struct socket *s, void *buffer, uint32_t len) {
int r = -1;
- u32 total = 0;
- u32 toread = len;
+ uint32_t total = 0;
+ uint32_t toread = len;
if(! ssh_socket_is_open(s)) {
return SSH_ERROR;
}
@@ -285,7 +285,7 @@ int ssh_socket_completeread(struct socket *s, void *buffer, u32 len) {
/** \internal
* \brief Blocking write of len bytes
*/
-int ssh_socket_completewrite(struct socket *s, const void *buffer, u32 len) {
+int ssh_socket_completewrite(struct socket *s, const void *buffer, uint32_t len) {
SSH_SESSION *session = s->session;
int written = -1;
@@ -370,7 +370,7 @@ int ssh_socket_write(struct socket *s, const void *buffer, int len) {
* \returns SSH_AGAIN need to call later for data
* \returns SSH_ERROR error happened
*/
-int ssh_socket_wait_for_data(struct socket *s, SSH_SESSION *session, u32 len) {
+int ssh_socket_wait_for_data(struct socket *s, SSH_SESSION *session, uint32_t len) {
char buffer[4096] = {0};
char *buf = NULL;
int except;
@@ -446,7 +446,7 @@ int ssh_socket_wait_for_data(struct socket *s, SSH_SESSION *session, u32 len) {
return SSH_ERROR;
}
- if (buffer_add_data(s->in_buffer,buffer, (u32) r) < 0) {
+ if (buffer_add_data(s->in_buffer,buffer, (uint32_t) r) < 0) {
leave_function();
return SSH_ERROR;
}