Commit f3da24f7 authored by sbbs's avatar sbbs
Browse files

pthread thread names are limited to 15 chars (not including nul terminator)

so use shorter thread names.
parent cdef2d33
......@@ -1250,7 +1250,7 @@ static void send_thread(void* arg)
xfer=*(xfer_t*)arg;
free(arg);
SetThreadName("sbbs/FTP Send");
SetThreadName("sbbs/ftpSend");
thread_up(TRUE /* setuid */);
length=flength(xfer.filename);
......@@ -1510,7 +1510,7 @@ static void receive_thread(void* arg)
xfer=*(xfer_t*)arg;
free(arg);
SetThreadName("sbbs/FTP Receive");
SetThreadName("sbbs/ftpReceive");
thread_up(TRUE /* setuid */);
if((fp=fopen(xfer.filename,xfer.append ? "ab" : "wb"))==NULL) {
......@@ -2370,7 +2370,7 @@ static void ctrl_thread(void* arg)
#endif
login_attempt_t attempted;
SetThreadName("sbbs/FTP Control");
SetThreadName("sbbs/ftpControl");
thread_up(TRUE /* setuid */);
lastactive=time(NULL);
......@@ -4776,7 +4776,7 @@ void DLLCALL ftp_server(void* arg)
ftp_ver();
startup=(ftp_startup_t*)arg;
SetThreadName("sbbs/FTP Server");
SetThreadName("sbbs/ftpServer");
#ifdef _THREAD_SUID_BROKEN
if(thread_suid_broken)
......
......@@ -123,7 +123,7 @@ static void background_thread(void* arg)
jsval result=JSVAL_VOID;
jsval exit_code;
SetThreadName("sbbs/JS Background");
SetThreadName("sbbs/jsBackgrnd");
msgQueueAttach(bg->msg_queue);
JS_SetContextThread(bg->cx);
JS_BEGINREQUEST(bg->cx);
......
......@@ -26,7 +26,7 @@ static link_list_t rt_list;
#define TRIGGER_THREAD_STACK_SIZE (256*1024)
static void trigger_thread(void *args)
{
SetThreadName("sbbs/JSRT Trigger");
SetThreadName("sbbs/jsRTtrig");
for(;;) {
list_node_t *node;
pthread_mutex_lock(&jsrt_mutex);
......
......@@ -826,7 +826,7 @@ static void pop3_thread(void* arg)
pop3_t pop3=*(pop3_t*)arg;
login_attempt_t attempted;
SetThreadName("sbbs/POP3");
SetThreadName("sbbs/pop3");
thread_up(TRUE /* setuid */);
free(arg);
......@@ -2498,7 +2498,7 @@ static void smtp_thread(void* arg)
,ENCODING_QUOTED_PRINTABLE
} content_encoding = ENCODING_NONE;
SetThreadName("sbbs/SMTP");
SetThreadName("sbbs/smtp");
thread_up(TRUE /* setuid */);
free(arg);
......@@ -4532,7 +4532,7 @@ static void sendmail_thread(void* arg)
BOOL sending_locally=FALSE;
link_list_t failed_server_list;
SetThreadName("sbbs/SendMail");
SetThreadName("sbbs/sendMail");
thread_up(TRUE /* setuid */);
terminate_sendmail=FALSE;
......@@ -5208,7 +5208,7 @@ void DLLCALL mail_server(void* arg)
startup->shutdown_now=FALSE;
terminate_server=FALSE;
SetThreadName("sbbs/Mail Server");
SetThreadName("sbbs/mailServer");
protected_uint32_init(&thread_count, 0);
do {
......
......@@ -1663,7 +1663,7 @@ void input_thread(void *arg)
SOCKET high_socket;
SOCKET sock;
SetThreadName("sbbs/Terminal Input");
SetThreadName("sbbs/termInput");
thread_up(TRUE /* setuid */);
#ifdef _DEBUG
......@@ -1934,7 +1934,7 @@ void passthru_output_thread(void* arg)
int rd;
int wr;
SetThreadName("sbbs/Passthrough Output");
SetThreadName("sbbs/ptOutput");
thread_up(FALSE /* setuid */);
while(sbbs->client_socket!=INVALID_SOCKET && sbbs->passthru_socket!=INVALID_SOCKET && !terminate_server) {
......@@ -2048,7 +2048,7 @@ void passthru_input_thread(void* arg)
BYTE ch;
int i;
SetThreadName("sbbs/Passthrough Input");
SetThreadName("sbbs/ptInput");
thread_up(FALSE /* setuid */);
while(sbbs->passthru_socket!=INVALID_SOCKET && !terminate_server) {
......@@ -2139,7 +2139,7 @@ void output_thread(void* arg)
struct timeval tv;
ulong mss=IO_THREAD_BUF_SIZE;
SetThreadName("sbbs/Terminal Output");
SetThreadName("sbbs/termOutput");
thread_up(TRUE /* setuid */);
if(sbbs->cfg.node_num)
......@@ -2379,7 +2379,7 @@ void event_thread(void* arg)
sbbs_srand(); /* Seed random number generator */
SetThreadName("sbbs/Events");
SetThreadName("sbbs/events");
thread_up(TRUE /* setuid */);
#ifdef JAVASCRIPT
......@@ -4131,7 +4131,7 @@ void node_thread(void* arg)
sbbs_t* sbbs = (sbbs_t*) arg;
update_clients();
SetThreadName("sbbs/Terminal Node");
SetThreadName("sbbs/termNode");
thread_up(TRUE /* setuid */);
#ifdef _DEBUG
......@@ -4632,7 +4632,7 @@ void DLLCALL bbs_thread(void* arg)
startup->shutdown_now=FALSE;
terminate_server=false;
SetThreadName("sbbs/Terminal Server");
SetThreadName("sbbs/termServer");
do {
/* Setup intelligent defaults */
......
......@@ -1101,7 +1101,7 @@ static void handle_sigs(void)
int sig=0;
sigset_t sigs;
SetThreadName("sbbs/Signal Handler");
SetThreadName("sbbs/sigHandler");
thread_up(NULL,TRUE,TRUE);
/* Write the standard .pid file if created/open */
......
......@@ -979,7 +979,7 @@ static void js_service_thread(void* arg)
lprintf(LOG_DEBUG,"%04d %s JavaScript service thread started", socket, service->protocol);
SetThreadName("sbbs/JS Service");
SetThreadName("sbbs/jsService");
thread_up(TRUE /* setuid */);
protected_uint32_adjust(&threads_pending_start, -1);
......@@ -1182,7 +1182,7 @@ static void js_static_service_thread(void* arg)
lprintf(LOG_DEBUG,"%s static JavaScript service thread started", service->protocol);
SetThreadName("sbbs/JS Static Service");
SetThreadName("sbbs/jsStatic");
thread_up(TRUE /* setuid */);
protected_uint32_adjust(&threads_pending_start, -1);
......@@ -1281,7 +1281,7 @@ static void native_static_service_thread(void* arg)
lprintf(LOG_DEBUG,"%04d %s static service thread started", inst.socket, inst.service->protocol);
SetThreadName("sbbs/Static Service");
SetThreadName("sbbs/static");
thread_up(TRUE /* setuid */);
protected_uint32_adjust(&threads_pending_start, -1);
......@@ -1344,7 +1344,7 @@ static void native_service_thread(void* arg)
lprintf(LOG_DEBUG,"%04d %s service thread started", socket, service->protocol);
SetThreadName("sbbs/Native Service");
SetThreadName("sbbs/native");
thread_up(TRUE /* setuid */);
protected_uint32_adjust(&threads_pending_start, -1);
......@@ -1734,7 +1734,7 @@ void DLLCALL services_thread(void* arg)
startup->recycle_now=FALSE;
startup->shutdown_now=FALSE;
SetThreadName("sbbs/Services");
SetThreadName("sbbs/services");
do {
/* Setup intelligent defaults */
......
......@@ -6009,7 +6009,7 @@ void http_output_thread(void *arg)
int i;
unsigned mss=OUTBUF_LEN;
SetThreadName("sbbs/HTTP Output");
SetThreadName("sbbs/httpOutput");
thread_up(TRUE /* setuid */);
obuf=&(session->outbuf);
......@@ -6145,7 +6145,7 @@ void http_session_thread(void* arg)
char *uname;
#endif
SetThreadName("sbbs/HTTP Session");
SetThreadName("sbbs/httpSess");
pthread_mutex_lock(&((http_session_t*)arg)->struct_filled);
pthread_mutex_unlock(&((http_session_t*)arg)->struct_filled);
pthread_mutex_destroy(&((http_session_t*)arg)->struct_filled);
......@@ -6511,7 +6511,7 @@ void http_logging_thread(void* arg)
if(!base[0])
SAFEPRINTF(base,"%slogs/http-",scfg.logs_dir);
SetThreadName("sbbs/HTTP Logging");
SetThreadName("sbbs/httpLog");
filename[0]=0;
newfilename[0]=0;
......@@ -6625,7 +6625,7 @@ void DLLCALL web_server(void* arg)
startup=(web_startup_t*)arg;
SetThreadName("sbbs/Web Server");
SetThreadName("sbbs/webServer");
web_ver(); /* get CVS revision */
if(startup==NULL) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment