Added /etc/services check
This commit is contained in:
parent
4f9e87f60d
commit
143de27956
@ -117,6 +117,13 @@ void send_all(char *msg)
|
|||||||
*/
|
*/
|
||||||
void *ibc_thread(void *dummy)
|
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");
|
Syslog('+', "Starting IBC thread");
|
||||||
ibc_run = TRUE;
|
ibc_run = TRUE;
|
||||||
|
|
||||||
@ -124,6 +131,7 @@ void *ibc_thread(void *dummy)
|
|||||||
sleep(1);
|
sleep(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
exit:
|
||||||
ibc_run = FALSE;
|
ibc_run = FALSE;
|
||||||
Syslog('+', "IBC thread stopped");
|
Syslog('+', "IBC thread stopped");
|
||||||
pthread_exit(NULL);
|
pthread_exit(NULL);
|
||||||
|
Reference in New Issue
Block a user