Fix errors introduced by r962 on unix side

This commit is contained in:
Ron Pedde 2006-04-17 04:56:22 +00:00
parent 201ab40e73
commit e3fc9fa94c
2 changed files with 8 additions and 2 deletions

View File

@ -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;

View File

@ -37,6 +37,12 @@
/* Prototypes for the three public UICI functions */
/*********************************************************************/
#define UPORT
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
typedef unsigned short u_port_t;
int u_open(u_port_t port);
int u_accept(int fd, struct in_addr *hostaddr);