From e3fc9fa94c5a2872db96b2b8fafaa8148a1c852d Mon Sep 17 00:00:00 2001 From: Ron Pedde Date: Mon, 17 Apr 2006 04:56:22 +0000 Subject: [PATCH] Fix errors introduced by r962 on unix side --- src/uici.c | 4 ++-- src/uici.h | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/uici.c b/src/uici.c index 25ef0cc8..3d983075 100644 --- a/src/uici.c +++ b/src/uici.c @@ -134,7 +134,7 @@ int u_open(u_port_t port) { * into the buffer. * If hostn is NULL or hostnsize <= 0, no hostname is copied. */ -int u_accept(int fd, char *hostn, strcut in_addr *hostaddr) { +int u_accept(int fd, struct in_addr *hostaddr) { socklen_t len = sizeof(struct sockaddr); struct sockaddr_in netclient; int retval; @@ -143,7 +143,7 @@ int u_accept(int fd, char *hostn, strcut in_addr *hostaddr) { accept(fd, (struct sockaddr *)(&netclient), &len)) == -1) && (errno == EINTR)) ; - if ((retval == -1) || (hostn == NULL) || (hostnsize <= 0)) + if (retval == -1) return retval; *hostaddr = netclient.sin_addr; diff --git a/src/uici.h b/src/uici.h index 3937cfe3..9fa0df7c 100644 --- a/src/uici.h +++ b/src/uici.h @@ -37,6 +37,12 @@ /* Prototypes for the three public UICI functions */ /*********************************************************************/ #define UPORT + +#include +#include +#include +#include + typedef unsigned short u_port_t; int u_open(u_port_t port); int u_accept(int fd, struct in_addr *hostaddr);