summaryrefslogtreecommitdiffstats
path: root/innbbsd/inndchannel.c
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-08-12 00:53:49 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-08-12 00:53:49 +0800
commit6610078a22d58184eb6deba40a67dda742954fbe (patch)
tree81feec9fba1f4916d7f8146d7c790bc25af7fdb5 /innbbsd/inndchannel.c
parent4c2b88e9c74d936675a4a7a11cb068cab7cbe4f3 (diff)
downloadpttbbs-6610078a22d58184eb6deba40a67dda742954fbe.tar
pttbbs-6610078a22d58184eb6deba40a67dda742954fbe.tar.gz
pttbbs-6610078a22d58184eb6deba40a67dda742954fbe.tar.bz2
pttbbs-6610078a22d58184eb6deba40a67dda742954fbe.tar.lz
pttbbs-6610078a22d58184eb6deba40a67dda742954fbe.tar.xz
pttbbs-6610078a22d58184eb6deba40a67dda742954fbe.tar.zst
pttbbs-6610078a22d58184eb6deba40a67dda742954fbe.zip
make the compiler happy!
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3026 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'innbbsd/inndchannel.c')
-rw-r--r--innbbsd/inndchannel.c23
1 files changed, 15 insertions, 8 deletions
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 <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#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;
}