From 143de27956bb6c3b426fd322ebdfda9a029e1f88 Mon Sep 17 00:00:00 2001 From: Michiel Broek Date: Sat, 16 Apr 2005 16:08:32 +0000 Subject: [PATCH] Added /etc/services check --- mbtask/taskibc.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/mbtask/taskibc.c b/mbtask/taskibc.c index 162b6605..f185d1e5 100644 --- a/mbtask/taskibc.c +++ b/mbtask/taskibc.c @@ -117,6 +117,13 @@ void send_all(char *msg) */ void *ibc_thread(void *dummy) { + struct servent *se; + + if ((se = getservbyname("fido", "udp")) == NULL) { + Syslog('!', "No fido udp entry in /etc/services, cannot start Internet BBS Chat"); + goto exit; + } + Syslog('+', "Starting IBC thread"); ibc_run = TRUE; @@ -124,6 +131,7 @@ void *ibc_thread(void *dummy) sleep(1); } +exit: ibc_run = FALSE; Syslog('+', "IBC thread stopped"); pthread_exit(NULL);