aboutsummaryrefslogtreecommitdiff
path: root/libssh
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cynapses.org>2010-06-17 13:19:24 +0200
committerAndreas Schneider <asn@cynapses.org>2010-06-17 13:19:24 +0200
commit870c9a7a08b820e81e9267c5de7eab544bb737d1 (patch)
tree68e96576d2592f1023be00e925779084b4d39116 /libssh
parent2a6341c08c358ad1888a620caf8502abf1ec654f (diff)
downloadlibssh-870c9a7a08b820e81e9267c5de7eab544bb737d1.tar.gz
libssh-870c9a7a08b820e81e9267c5de7eab544bb737d1.tar.xz
libssh-870c9a7a08b820e81e9267c5de7eab544bb737d1.zip
socket: Rename INVALID_SOCKET_T to SSH_INVALID_SOCKET.
Diffstat (limited to 'libssh')
-rw-r--r--libssh/socket.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/libssh/socket.c b/libssh/socket.c
index 777bab3..4666961 100644
--- a/libssh/socket.c
+++ b/libssh/socket.c
@@ -136,8 +136,8 @@ ssh_socket ssh_socket_new(ssh_session session) {
if (s == NULL) {
return NULL;
}
- s->fd_in = INVALID_SOCKET_T;
- s->fd_out= INVALID_SOCKET_T;
+ s->fd_in = SSH_INVALID_SOCKET;
+ s->fd_out= SSH_INVALID_SOCKET;
s->last_errno = -1;
s->fd_is_socket = 1;
s->session = session;
@@ -346,7 +346,7 @@ void ssh_socket_close(ssh_socket s){
close(s->fd_out);
s->last_errno = errno;
#endif
- s->fd_in = s->fd_out = INVALID_SOCKET_T;
+ s->fd_in = s->fd_out = SSH_INVALID_SOCKET;
}
if(s->poll_in != NULL){
if(s->poll_out == s->poll_in)
@@ -411,7 +411,7 @@ socket_t ssh_socket_get_fd_in(ssh_socket s) {
* \brief returns nonzero if the socket is open
*/
int ssh_socket_is_open(ssh_socket s) {
- return s->fd_in != INVALID_SOCKET_T;
+ return s->fd_in != SSH_INVALID_SOCKET;
}
/** \internal
@@ -476,7 +476,7 @@ static int ssh_socket_unbuffered_write(ssh_socket s, const void *buffer,
* \brief returns nonzero if the current socket is in the fd_set
*/
int ssh_socket_fd_isset(ssh_socket s, fd_set *set) {
- if(s->fd_in == INVALID_SOCKET_T) {
+ if(s->fd_in == SSH_INVALID_SOCKET) {
return 0;
}
return FD_ISSET(s->fd_in,set) || FD_ISSET(s->fd_out,set);
@@ -487,17 +487,17 @@ int ssh_socket_fd_isset(ssh_socket s, fd_set *set) {
*/
void ssh_socket_fd_set(ssh_socket s, fd_set *set, socket_t *max_fd) {
- if (s->fd_in == INVALID_SOCKET_T) {
+ if (s->fd_in == SSH_INVALID_SOCKET) {
return;
}
FD_SET(s->fd_in,set);
FD_SET(s->fd_out,set);
- if (s->fd_in >= 0 && s->fd_in != INVALID_SOCKET_T) {
+ if (s->fd_in >= 0 && s->fd_in != SSH_INVALID_SOCKET) {
*max_fd = s->fd_in + 1;
}
- if (s->fd_out >= 0 && s->fd_in != INVALID_SOCKET_T) {
+ if (s->fd_out >= 0 && s->fd_in != SSH_INVALID_SOCKET) {
*max_fd = s->fd_out + 1;
}
}