Added /etc/services check

This commit is contained in:
Michiel Broek 2005-04-16 16:08:32 +00:00
parent 4f9e87f60d
commit 143de27956

View File

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