Commit 9d3db120 authored by rswindell's avatar rswindell
Browse files

Overhaul of log output strings and log levels.

Eliminated some bcc32-reported warnings.
parent a60eaea7
......@@ -158,12 +158,12 @@ static BOOL winsock_startup(void)
int status; /* Status Code */
if((status = WSAStartup(MAKEWORD(1,1), &WSAData))==0) {
lprintf(LOG_INFO,"%s %s",WSAData.szDescription, WSAData.szSystemStatus);
lprintf(LOG_DEBUG,"%s %s",WSAData.szDescription, WSAData.szSystemStatus);
WSAInitialized=TRUE;
return (TRUE);
}
lprintf(LOG_ERR,"!WinSock startup ERROR %d", status);
lprintf(LOG_CRIT,"!WinSock startup ERROR %d", status);
return (FALSE);
}
......@@ -1287,7 +1287,7 @@ static char* cmdstr(user_t* user, char *instr, char *fpath, char *fspec, char *c
void DLLCALL ftp_terminate(void)
{
lprintf(LOG_DEBUG,"%04d FTP Server terminate",server_socket);
lprintf(LOG_INFO,"%04d FTP Server terminate",server_socket);
terminate_server=TRUE;
}
......@@ -2430,7 +2430,7 @@ static void ctrl_thread(void* arg)
SAFECOPY(host_ip,inet_ntoa(ftp.client_addr.sin_addr));
lprintf(LOG_DEBUG,"%04d CTRL connection accepted from: %s port %u"
lprintf(LOG_INFO,"%04d CTRL connection accepted from: %s port %u"
,sock, host_ip, ntohs(ftp.client_addr.sin_port));
if(startup->options&FTP_OPT_NO_HOST_LOOKUP)
......@@ -4520,14 +4520,14 @@ static void ctrl_thread(void* arg)
active_clients--, update_clients();
thread_down();
lprintf(LOG_DEBUG,"%04d CTRL thread terminated (%d clients, %u threads remain, %lu served)"
lprintf(LOG_INFO,"%04d CTRL thread terminated (%d clients, %u threads remain, %lu served)"
,sock, active_clients, thread_count, served);
}
static void cleanup(int code, int line)
{
#ifdef _DEBUG
lprintf(LOG_INFO,"0000 cleanup called from line %d",line);
lprintf(LOG_DEBUG,"0000 cleanup called from line %d",line);
#endif
free_cfg(&scfg);
free_text(text);
......@@ -4691,8 +4691,8 @@ void DLLCALL ftp_server(void* arg)
scfg.size=sizeof(scfg);
SAFECOPY(error,UNKNOWN_LOAD_ERROR);
if(!load_cfg(&scfg, text, TRUE, error)) {
lprintf(LOG_ERR,"!ERROR %s",error);
lprintf(LOG_ERR,"!Failed to load configuration files");
lprintf(LOG_CRIT,"!ERROR %s",error);
lprintf(LOG_CRIT,"!Failed to load configuration files");
cleanup(1,__LINE__);
return;
}
......@@ -4715,7 +4715,7 @@ void DLLCALL ftp_server(void* arg)
MKDIR(scfg.temp_dir);
lprintf(LOG_DEBUG,"Temporary file directory: %s", scfg.temp_dir);
if(!isdir(scfg.temp_dir)) {
lprintf(LOG_ERR,"!Invalid temp directory: %s", scfg.temp_dir);
lprintf(LOG_CRIT,"!Invalid temp directory: %s", scfg.temp_dir);
cleanup(1,__LINE__);
return;
}
......@@ -4755,7 +4755,7 @@ void DLLCALL ftp_server(void* arg)
/* open a socket and wait for a client */
if((server_socket=ftp_open_socket(SOCK_STREAM))==INVALID_SOCKET) {
lprintf(LOG_ERR,"!ERROR %d opening socket", ERROR_VALUE);
lprintf(LOG_CRIT,"!ERROR %d opening socket", ERROR_VALUE);
cleanup(1,__LINE__);
return;
}
......@@ -4782,20 +4782,21 @@ void DLLCALL ftp_server(void* arg)
startup->seteuid(TRUE);
}
if(result!=0) {
lprintf(LOG_ERR,"%04d %s", server_socket, BIND_FAILURE_HELP);
lprintf(LOG_CRIT,"%04d %s", server_socket, BIND_FAILURE_HELP);
cleanup(1,__LINE__);
return;
}
if((result=listen(server_socket, 1))!= 0) {
lprintf(LOG_ERR,"%04d !ERROR %d (%d) listening on socket"
lprintf(LOG_CRIT,"%04d !ERROR %d (%d) listening on socket"
,server_socket, result, ERROR_VALUE);
cleanup(1,__LINE__);
return;
}
lprintf(LOG_NOTICE,"%04d FTP Server thread started on port %d",server_socket,startup->port);
lprintf(LOG_INFO,"%04d FTP Server listening on port %d",server_socket,startup->port);
status(STATUS_WFC);
lprintf(LOG_INFO,"%04d FTP Server thread started",server_socket);
/* Setup recycle/shutdown semaphore file lists */
shutdown_semfiles=semfile_list_init(scfg.ctrl_dir,"shutdown","ftp");
......@@ -4912,7 +4913,7 @@ void DLLCALL ftp_server(void* arg)
served++;
}
#ifdef _DEBUG
#if 0 /* def _DEBUG */
lprintf(LOG_DEBUG,"0000 server_socket: %d",server_socket);
lprintf(LOG_DEBUG,"0000 terminate_server: %d",terminate_server);
#endif
......
......@@ -8,7 +8,7 @@
* @format.tab-size 4 (Plain Text/Source Code File Header) *
* @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) *
* *
* Copyright 2008 Rob Swindell - http://www.synchro.net/copyright.html *
* Copyright 2009 Rob Swindell - http://www.synchro.net/copyright.html *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
......@@ -247,7 +247,7 @@ static BOOL winsock_startup(void)
return(TRUE);
}
lprintf(LOG_ERR,"!WinSock startup ERROR %d", status);
lprintf(LOG_CRIT,"!WinSock startup ERROR %d", status);
return(FALSE);
}
......
......@@ -149,7 +149,7 @@ static BOOL winsock_startup(void)
int status; /* Status Code */
if((status = WSAStartup(MAKEWORD(1,1), &WSAData))==0) {
lprintf(LOG_INFO,"%s %s",WSAData.szDescription, WSAData.szSystemStatus);
lprintf(LOG_DEBUG,"%s %s",WSAData.szDescription, WSAData.szSystemStatus);
WSAInitialized=TRUE;
return (TRUE);
}
......@@ -1620,7 +1620,7 @@ js_mailproc(SOCKET sock, client_t* client, user_t* user, struct mailproc* mailpr
,char* msgtxt_fname, char* newtxt_fname, char* logtxt_fname
,char* rcptlst_fname, char* proc_err_fname
,char* sender, char* sender_addr, char* reverse_path, char* hello_name
,int* result
,int32* result
,JSRuntime** js_runtime
,JSContext** js_cx
,JSObject** js_glob
......@@ -1799,7 +1799,7 @@ js_mailproc(SOCKET sock, client_t* client, user_t* user, struct mailproc* mailpr
return(success);
}
js_cleanup(JSRuntime* js_runtime, JSContext* js_cx)
void js_cleanup(JSRuntime* js_runtime, JSContext* js_cx)
{
if(js_cx!=NULL)
JS_DestroyContext(js_cx);
......@@ -2105,6 +2105,7 @@ static void smtp_thread(void* arg)
JSRuntime* js_runtime=NULL;
JSContext* js_cx=NULL;
JSObject* js_glob=NULL;
int32 js_result;
enum {
SMTP_STATE_INITIAL
......@@ -2132,7 +2133,7 @@ static void smtp_thread(void* arg)
socket=smtp.socket;
lprintf(LOG_DEBUG,"%04d SMTP RX Session thread started", socket);
lprintf(LOG_DEBUG,"%04d SMTP Session thread started", socket);
#ifdef _WIN32
if(startup->inbound_sound[0] && !(startup->options&MAIL_OPT_MUTE))
......@@ -2458,12 +2459,12 @@ static void smtp_thread(void* arg)
,str /* cmdline */
,msgtxt_fname, newtxt_fname, logtxt_fname
,rcptlst_fname, proc_err_fname
,sender, sender_addr, reverse_path, hello_name, &j
,sender, sender_addr, reverse_path, hello_name, &js_result
,&js_runtime, &js_cx, &js_glob
,"SMTP") || j!=0) {
,"SMTP") || js_result!=0) {
#if 0 /* calling exit() in a script causes js_mailproc to return FALSE */
lprintf(LOG_NOTICE,"%04d !SMTP JavaScript mailproc command (%s) failed (returned: %d)"
,socket, str, j);
,socket, str, js_result);
if(mailproc_list[i].ignore_on_error) {
lprintf(LOG_WARNING,"%04d !SMTP IGNORED MAIL due to mail processor (%s) failure"
,socket, mailproc_list[i].name);
......@@ -3620,7 +3621,7 @@ static void smtp_thread(void* arg)
client_off(socket);
thread_down();
lprintf(LOG_DEBUG,"%04d SMTP RX Session thread terminated (%u threads remain, %lu clients served)"
lprintf(LOG_INFO,"%04d SMTP Session thread terminated (%u threads remain, %lu clients served)"
,socket, thread_count, served);
/* Must be last */
......@@ -3825,7 +3826,7 @@ static void sendmail_thread(void* arg)
sendmail_running=TRUE;
terminate_sendmail=FALSE;
lprintf(LOG_DEBUG,"0000 SendMail thread started");
lprintf(LOG_INFO,"0000 SendMail thread started");
memset(&msg,0,sizeof(msg));
memset(&smb,0,sizeof(smb));
......@@ -4290,7 +4291,7 @@ static void sendmail_thread(void* arg)
void DLLCALL mail_terminate(void)
{
lprintf(LOG_DEBUG,"%04d Mail Server terminate",server_socket);
lprintf(LOG_INFO,"%04d Mail Server terminate",server_socket);
terminate_server=TRUE;
}
......@@ -4471,7 +4472,7 @@ void DLLCALL mail_server(void* arg)
lprintf(LOG_INFO,"Compiled %s %s with %s", __DATE__, __TIME__, compiler);
lprintf(LOG_INFO,"SMBLIB %s (format %x.%02x)",smb_lib_ver(),smb_ver()>>8,smb_ver()&0xff);
lprintf(LOG_DEBUG,"SMBLIB %s (format %x.%02x)",smb_lib_ver(),smb_ver()>>8,smb_ver()&0xff);
sbbs_srand();
......@@ -4490,8 +4491,8 @@ void DLLCALL mail_server(void* arg)
scfg.size=sizeof(scfg);
SAFECOPY(error,UNKNOWN_LOAD_ERROR);
if(!load_cfg(&scfg, NULL, TRUE, error)) {
lprintf(LOG_ERR,"!ERROR %s",error);
lprintf(LOG_ERR,"!Failed to load configuration files");
lprintf(LOG_CRIT,"!ERROR %s",error);
lprintf(LOG_CRIT,"!Failed to load configuration files");
cleanup(1);
return;
}
......@@ -4504,7 +4505,7 @@ void DLLCALL mail_server(void* arg)
MKDIR(scfg.temp_dir);
lprintf(LOG_DEBUG,"Temporary file directory: %s", scfg.temp_dir);
if(!isdir(scfg.temp_dir)) {
lprintf(LOG_ERR,"!Invalid temp directory: %s", scfg.temp_dir);
lprintf(LOG_CRIT,"!Invalid temp directory: %s", scfg.temp_dir);
cleanup(1);
return;
}
......@@ -4573,7 +4574,7 @@ void DLLCALL mail_server(void* arg)
server_socket = mail_open_socket(SOCK_STREAM,"smtp");
if(server_socket == INVALID_SOCKET) {
lprintf(LOG_ERR,"!ERROR %d opening socket", ERROR_VALUE);
lprintf(LOG_CRIT,"!ERROR %d opening socket", ERROR_VALUE);
cleanup(1);
return;
}
......@@ -4600,29 +4601,29 @@ void DLLCALL mail_server(void* arg)
startup->seteuid(TRUE);
}
if(result != 0) {
lprintf(LOG_ERR,"%04d %s",server_socket, BIND_FAILURE_HELP);
lprintf(LOG_CRIT,"%04d %s",server_socket, BIND_FAILURE_HELP);
cleanup(1);
return;
}
lprintf(LOG_DEBUG,"%04d SMTP socket bound to port %u"
,server_socket, startup->smtp_port);
result = listen(server_socket, 1);
if(result != 0) {
lprintf(LOG_ERR,"%04d !ERROR %d (%d) listening on socket"
lprintf(LOG_CRIT,"%04d !ERROR %d (%d) listening on SMTP socket"
,server_socket, result, ERROR_VALUE);
cleanup(1);
return;
}
lprintf(LOG_INFO,"%04d SMTP Server listening on port %u"
,server_socket, startup->smtp_port);
if(startup->options&MAIL_OPT_USE_SUBMISSION_PORT) {
submission_socket = mail_open_socket(SOCK_STREAM,"submission");
if(submission_socket == INVALID_SOCKET) {
lprintf(LOG_ERR,"!ERROR %d opening socket", ERROR_VALUE);
lprintf(LOG_CRIT,"!ERROR %d opening socket", ERROR_VALUE);
cleanup(1);
return;
}
......@@ -4649,22 +4650,22 @@ void DLLCALL mail_server(void* arg)
startup->seteuid(TRUE);
}
if(result != 0) {
lprintf(LOG_ERR,"%04d %s",submission_socket, BIND_FAILURE_HELP);
lprintf(LOG_CRIT,"%04d %s",submission_socket, BIND_FAILURE_HELP);
cleanup(1);
return;
}
lprintf(LOG_DEBUG,"%04d SUBMISSION socket bound to port %u"
,submission_socket, startup->submission_port);
result = listen(submission_socket, 1);
if(result != 0) {
lprintf(LOG_ERR,"%04d !ERROR %d (%d) listening on socket"
lprintf(LOG_CRIT,"%04d !ERROR %d (%d) listening on SUBMISSION socket"
,submission_socket, result, ERROR_VALUE);
cleanup(1);
return;
}
lprintf(LOG_INFO,"%04d SUBMISSION Server listening on port %u"
,submission_socket, startup->submission_port);
}
if(startup->options&MAIL_OPT_ALLOW_POP3) {
......@@ -4674,7 +4675,7 @@ void DLLCALL mail_server(void* arg)
pop3_socket = mail_open_socket(SOCK_STREAM,"pop3");
if(pop3_socket == INVALID_SOCKET) {
lprintf(LOG_ERR,"!ERROR %d opening POP3 socket", ERROR_VALUE);
lprintf(LOG_CRIT,"!ERROR %d opening POP3 socket", ERROR_VALUE);
cleanup(1);
return;
}
......@@ -4701,22 +4702,22 @@ void DLLCALL mail_server(void* arg)
startup->seteuid(FALSE);
}
if(result != 0) {
lprintf(LOG_ERR,"%04d %s",pop3_socket,BIND_FAILURE_HELP);
lprintf(LOG_CRIT,"%04d %s",pop3_socket,BIND_FAILURE_HELP);
cleanup(1);
return;
}
lprintf(LOG_DEBUG,"%04d POP3 socket bound to port %u"
,pop3_socket, startup->pop3_port);
result = listen(pop3_socket, 1);
if(result != 0) {
lprintf(LOG_ERR,"%04d !ERROR %d (%d) listening on POP3 socket"
lprintf(LOG_CRIT,"%04d !ERROR %d (%d) listening on POP3 socket"
,pop3_socket, result, ERROR_VALUE);
cleanup(1);
return;
}
lprintf(LOG_INFO,"%04d POP3 Server listening on port %u"
,pop3_socket, startup->pop3_port);
}
sem_init(&sendmail_wakeup_sem,0,0);
......@@ -4724,7 +4725,7 @@ void DLLCALL mail_server(void* arg)
if(!(startup->options&MAIL_OPT_NO_SENDMAIL))
_beginthread(sendmail_thread, 0, NULL);
lprintf(LOG_NOTICE,"%04d Mail Server thread started",server_socket);
lprintf(LOG_INFO,"%04d Mail Server thread started",server_socket);
status(STATUS_WFC);
/* Setup recycle/shutdown semaphore file lists */
......
......@@ -174,7 +174,7 @@ int eprintf(int level, const char *fmt, ...)
va_list argptr;
char sbuf[1024];
if(startup==NULL || startup->event_lputs==NULL)
if(startup==NULL || startup->event_lputs==NULL || level > startup->log_level)
return(0);
va_start(argptr,fmt);
......@@ -258,12 +258,12 @@ static BOOL winsock_startup(void)
int status; /* Status Code */
if((status = WSAStartup(MAKEWORD(1,1), &WSAData))==0) {
lprintf(LOG_INFO,"%s %s",WSAData.szDescription, WSAData.szSystemStatus);
lprintf(LOG_DEBUG,"%s %s",WSAData.szDescription, WSAData.szSystemStatus);
WSAInitialized=TRUE;
return(TRUE);
}
lprintf(LOG_ERR,"!WinSock startup ERROR %d", status);
lprintf(LOG_CRIT,"!WinSock startup ERROR %d", status);
return(FALSE);
}
......@@ -660,7 +660,7 @@ js_log(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
}
rc=JS_SUSPENDREQUEST(cx);
if(sbbs->online==ON_LOCAL) {
if(startup!=NULL && startup->event_lputs!=NULL)
if(startup!=NULL && startup->event_lputs!=NULL && level <= startup->log_level)
startup->event_lputs(level,JS_GetStringBytes(str));
} else
lputs(level,JS_GetStringBytes(str));
......@@ -967,6 +967,7 @@ js_ErrorReporter(JSContext *cx, const char *message, JSErrorReport *report)
sbbs_t* sbbs;
const char* warning;
jsrefcount rc;
int log_level;
if((sbbs=(sbbs_t*)JS_GetContextPrivate(cx))==NULL)
return;
......@@ -991,14 +992,17 @@ js_ErrorReporter(JSContext *cx, const char *message, JSErrorReport *report)
warning="strict warning";
else
warning="warning";
} else
log_level = LOG_WARNING;
} else {
warning=nulstr;
log_level = LOG_ERR;
}
rc=JS_SUSPENDREQUEST(cx);
if(sbbs->online==ON_LOCAL)
eprintf(LOG_ERR,"!JavaScript %s%s%s: %s",warning,file,line,message);
eprintf(log_level,"!JavaScript %s%s%s: %s",warning,file,line,message);
else {
lprintf(LOG_ERR,"!JavaScript %s%s%s: %s",warning,file,line,message);
lprintf(log_level,"!JavaScript %s%s%s: %s",warning,file,line,message);
sbbs->bprintf("!JavaScript %s%s%s: %s\r\n",warning,file,line,message);
}
JS_RESUMEREQUEST(cx, rc);
......@@ -2091,7 +2095,7 @@ void event_thread(void* arg)
struct tm now_tm;
struct tm tm;
eprintf(LOG_DEBUG,"BBS Events thread started");
eprintf(LOG_INFO,"BBS Events thread started");
sbbs->event_thread_running = true;
......@@ -2101,7 +2105,7 @@ void event_thread(void* arg)
#ifdef JAVASCRIPT
if(!(startup->options&BBS_OPT_NO_JAVASCRIPT)) {
if(!sbbs->js_init(&stack_frame)) /* This must be done in the context of the event thread */
if(!sbbs->js_init(&stack_frame)) /* This must be done in the context of the events thread */
lprintf(LOG_ERR,"!JavaScript Initialization FAILURE");
}
#endif
......@@ -2731,7 +2735,7 @@ void event_thread(void* arg)
sbbs->js_cleanup(sbbs->client_name);
thread_down();
eprintf(LOG_DEBUG,"BBS Event thread terminated (%u threads remain)", thread_count);
eprintf(LOG_INFO,"BBS Events thread terminated");
}
......@@ -3938,7 +3942,7 @@ void node_thread(void* arg)
if(node_threads_running>0)
node_threads_running--;
lprintf(LOG_DEBUG,"Node %d thread terminated (%u node threads remain, %lu clients served)"
lprintf(LOG_INFO,"Node %d thread terminated (%u node threads remain, %lu clients served)"
,sbbs->cfg.node_num, node_threads_running, served);
if(!sbbs->input_thread_running && !sbbs->output_thread_running)
delete sbbs;
......@@ -4150,7 +4154,7 @@ long DLLCALL bbs_ver_num(void)
void DLLCALL bbs_terminate(void)
{
lprintf(LOG_DEBUG,"BBS Server terminate");
lprintf(LOG_INFO,"BBS Server terminate");
terminate_server=true;
}
......@@ -4299,7 +4303,7 @@ void DLLCALL bbs_thread(void* arg)
/* Defeat the lameo hex0rs - the name and copyright must remain intact */
if(crc32(COPYRIGHT_NOTICE,0)!=COPYRIGHT_CRC
|| crc32(VERSION_NOTICE,10)!=SYNCHRONET_CRC) {
lprintf(LOG_ERR,"!CORRUPTED LIBRARY FILE");
lprintf(LOG_CRIT,"!CORRUPTED LIBRARY FILE");
cleanup(1);
return;
}
......@@ -4324,10 +4328,10 @@ void DLLCALL bbs_thread(void* arg)
#endif
);
lprintf(LOG_INFO,"Compiled %s %s with %s", __DATE__, __TIME__, compiler);
lprintf(LOG_INFO,"SMBLIB %s (format %x.%02x)",smb_lib_ver(),smb_ver()>>8,smb_ver()&0xff);
lprintf(LOG_DEBUG,"SMBLIB %s (format %x.%02x)",smb_lib_ver(),smb_ver()>>8,smb_ver()&0xff);
if(startup->first_node<1 || startup->first_node>startup->last_node) {
lprintf(LOG_ERR,"!ILLEGAL node configuration (first: %d, last: %d)"
lprintf(LOG_CRIT,"!ILLEGAL node configuration (first: %d, last: %d)"
,startup->first_node, startup->last_node);
cleanup(1);
return;
......@@ -4338,7 +4342,7 @@ void DLLCALL bbs_thread(void* arg)
#pragma warn -8066 /* Disable "Unreachable code" warning */
#endif
if(sizeof(node_t)!=SIZEOF_NODE_T) {
lprintf(LOG_ERR,"!COMPILER ERROR: sizeof(node_t)=%d instead of %d"
lprintf(LOG_CRIT,"!COMPILER ERROR: sizeof(node_t)=%d instead of %d"
,sizeof(node_t),SIZEOF_NODE_T);
cleanup(1);
return;
......@@ -4346,7 +4350,7 @@ void DLLCALL bbs_thread(void* arg)
#ifdef _WIN32
if((exec_mutex=CreateMutex(NULL,false,NULL))==NULL) {
lprintf(LOG_ERR,"!ERROR %d creating exec_mutex", GetLastError());
lprintf(LOG_CRIT,"!ERROR %d creating exec_mutex", GetLastError());
cleanup(1);
return;
}
......@@ -4372,8 +4376,8 @@ void DLLCALL bbs_thread(void* arg)
scfg.node_num=startup->first_node;
SAFECOPY(logstr,UNKNOWN_LOAD_ERROR);
if(!load_cfg(&scfg, text, TRUE, logstr)) {
lprintf(LOG_ERR,"!ERROR %s",logstr);
lprintf(LOG_ERR,"!FAILED to load configuration files");
lprintf(LOG_CRIT,"!ERROR %s",logstr);
lprintf(LOG_CRIT,"!FAILED to load configuration files");
cleanup(1);
return;
}
......@@ -4406,7 +4410,7 @@ void DLLCALL bbs_thread(void* arg)
SAFEPRINTF(str,"%sdsts.dab",i ? scfg.node_path[i-1] : scfg.ctrl_dir);
if(flength(str)<DSTSDABLEN) {
if((file=sopen(str,O_WRONLY|O_CREAT|O_APPEND, SH_DENYNO, DEFFILEMODE))==-1) {
lprintf(LOG_ERR,"!ERROR %d creating %s",errno, str);
lprintf(LOG_CRIT,"!ERROR %d creating %s",errno, str);
cleanup(1);
return;
}
......@@ -4435,12 +4439,12 @@ void DLLCALL bbs_thread(void* arg)
telnet_socket = open_socket(SOCK_STREAM, "telnet");
if(telnet_socket == INVALID_SOCKET) {
lprintf(LOG_ERR,"!ERROR %d creating Telnet socket", ERROR_VALUE);
lprintf(LOG_CRIT,"!ERROR %d creating Telnet socket", ERROR_VALUE);
cleanup(1);
return;
}
lprintf(LOG_INFO,"Telnet socket %d opened",telnet_socket);
lprintf(LOG_DEBUG,"Telnet socket %d opened",telnet_socket);
/*****************************/
/* Listen for incoming calls */
......@@ -4462,7 +4466,7 @@ void DLLCALL bbs_thread(void* arg)
startup->seteuid(TRUE);
}
if(result != 0) {
lprintf(LOG_NOTICE,"%s",BIND_FAILURE_HELP);
lprintf(LOG_CRIT,"%s",BIND_FAILURE_HELP);
cleanup(1);
return;
}
......@@ -4470,7 +4474,7 @@ void DLLCALL bbs_thread(void* arg)
result = listen(telnet_socket, 1);
if(result != 0) {
lprintf(LOG_ERR,"!ERROR %d (%d) listening on Telnet socket", result, ERROR_VALUE);
lprintf(LOG_CRIT,"!ERROR %d (%d) listening on Telnet socket", result, ERROR_VALUE);
cleanup(1);
return;
}
......@@ -4483,12 +4487,12 @@ void DLLCALL bbs_thread(void* arg)
rlogin_socket = open_socket(SOCK_STREAM, "rlogin");
if(rlogin_socket == INVALID_SOCKET) {
lprintf(LOG_ERR,"!ERROR %d creating RLogin socket", ERROR_VALUE);
lprintf(LOG_CRIT,"!ERROR %d creating RLogin socket", ERROR_VALUE);
cleanup(1);
return;
}
lprintf(LOG_INFO,"RLogin socket %d opened",rlogin_socket);
lprintf(LOG_DEBUG,"RLogin socket %d opened",rlogin_socket);
/*****************************/
/* Listen for incoming calls */
......@@ -4510,7 +4514,7 @@ void DLLCALL bbs_thread(void* arg)
startup->seteuid(TRUE);
}
if(result != 0) {
lprintf(LOG_NOTICE,"%s",BIND_FAILURE_HELP);
lprintf(LOG_CRIT,"%s",BIND_FAILURE_HELP);
cleanup(1);
return;
}
......@@ -4518,7 +4522,7 @@ void DLLCALL bbs_thread(void* arg)
result = listen(rlogin_socket, 1);
if(result != 0) {
lprintf(LOG_ERR,"!ERROR %d (%d) listening on RLogin socket", result, ERROR_VALUE);
lprintf(LOG_CRIT,"!ERROR %d (%d) listening on RLogin socket", result, ERROR_VALUE);
cleanup(1);
return;
}
......@@ -4575,12 +4579,12 @@ void DLLCALL bbs_thread(void* arg)
ssh_socket = open_socket(SOCK_STREAM, "ssh");
if(ssh_socket == INVALID_SOCKET) {
lprintf(LOG_ERR,"!ERROR %d creating SSH socket", ERROR_VALUE);
lprintf(LOG_CRIT,"!ERROR %d creating SSH socket", ERROR_VALUE);
cleanup(1);
return;
}
lprintf(LOG_INFO,"SSH socket %d opened",ssh_socket);
lprintf(LOG_DEBUG,"SSH socket %d opened",ssh_socket);
/*****************************/
/* Listen for incoming calls */
......@@ -4602,7 +4606,7 @@ void DLLCALL bbs_thread(void* arg)
startup->seteuid(TRUE);
}
if(result != 0) {
lprintf(LOG_NOTICE,"%s",BIND_FAILURE_HELP);
lprintf(LOG_CRIT,"%s",BIND_FAILURE_HELP);
cleanup(1);
return;
}
......@@ -4610,7 +4614,7 @@ void DLLCALL bbs_thread(void* arg)
result = listen(ssh_socket, 1);
if(result != 0) {
lprintf(LOG_ERR,"!ERROR %d (%d) listening on SSH socket", result, ERROR_VALUE);
lprintf(LOG_CRIT,"!ERROR %d (%d) listening on SSH socket", result, ERROR_VALUE);
cleanup(1);
return;
}
......@@ -4623,7 +4627,7 @@ NO_SSH:
,"BBS System", telnet_socket, &scfg, text, NULL);
sbbs->online = 0;
if(sbbs->init()==false) {
lputs(LOG_ERR,"!BBS initialization failed");
lputs(LOG_CRIT,"!BBS initialization failed");
cleanup(1);
return;
}
......@@ -4634,7 +4638,7 @@ NO_SSH:
,"BBS Events", INVALID_SOCKET, &scfg, text, NULL);
events->online = 0;
if(events->init()==false) {
lputs(LOG_ERR,"!Events initialization failed");
lputs(LOG_CRIT,"!Events initialization failed");
cleanup(1);
return;
}
......@@ -4668,7 +4672,7 @@ NO_SSH: