From 6610078a22d58184eb6deba40a67dda742954fbe Mon Sep 17 00:00:00 2001 From: in2 Date: Thu, 11 Aug 2005 16:53:49 +0000 Subject: make the compiler happy! git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3026 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- innbbsd/inndchannel.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'innbbsd/inndchannel.c') diff --git a/innbbsd/inndchannel.c b/innbbsd/inndchannel.c index 8a920ce4..fe5b74ef 100644 --- a/innbbsd/inndchannel.c +++ b/innbbsd/inndchannel.c @@ -3,6 +3,11 @@ #include "daemon.h" #include "bbslib.h" #include "config.h" +#include "externs.h" +#include +#include +#include +#include "bbs.h" #define DEBUG #undef DEBUG @@ -43,6 +48,8 @@ char *REMOTEUSERNAME, *REMOTEHOSTNAME; static fd_set rfd, wfd, efd, orfd, owfd, oefd; +int channelreader(ClientType *); + void clearfdset(fd) int fd; @@ -120,8 +127,8 @@ inndchannel(port, path) bbsinnd = pmain(port); if (bbsinnd < 0) { perror("pmain, existing"); - docompletehalt(); - return (-1); + docompletehalt(0); + return; } FD_ZERO(&rfd); FD_ZERO(&wfd); @@ -135,7 +142,7 @@ inndchannel(port, path) * running, try to remove %s\n",path); */ close(bbsinnd); - return (-1); + return; } else { FD_SET(localbbsinnd, &rfd); localdaemonready = 1; @@ -169,7 +176,7 @@ inndchannel(port, path) if (INNBBSDshutdown()) { HISclose(); bbslog(" Shutdown Complete \n"); - docompletehalt(); + docompletehalt(0); exit(0); } time(&now); @@ -268,7 +275,7 @@ inndchannel(port, path) FD_SET(ns, &rfd); /* FD_SET(ns,&wfd); */ length = sizeof(there); if (getpeername(ns, (struct sockaddr *) & there, &length) >= 0) { - name = (char *)my_rfc931_name(ns, &there); + name = (char *)my_rfc931_name(ns, (struct sockaddr_in *)&there); strncpy(client[i].username, name, 20); hp = (struct hostent *) gethostbyaddr((char *)&there.sin_addr, sizeof(struct in_addr), there.sin_family); if (hp) @@ -513,11 +520,11 @@ standaloneinit(port) FILE *pf; char pidfile[24]; ndescriptors = getdtablesize(); - /* #ifndef NOFORK */ +#ifndef NOFORK if (!inetdstart) if (fork()) exit(0); - /* #endif */ +#endif sprintf(pidfile, "/tmp/innbbsd-%s.pid", port); /* @@ -572,7 +579,7 @@ main() static time_t INNBBSDstartup; int -innbbsdstartup() +innbbsdstartup(void) { return INNBBSDstartup; } -- cgit v1.2.3