Commit c635c3ac authored by rswindell's avatar rswindell
Browse files

Replace "<unknown>" as the "Unknown User" string with "<unknown user>"

globally (using a new macro in sbbbsdefs.h: STR_UNKNOWN_USER). "<unknown>"
in some contexts was too vague (e.g. the 'c' command output from the sbbs
console).
parent 7ca2cf57
......@@ -2463,7 +2463,7 @@ static void ctrl_thread(void* arg)
SAFECOPY(client.host,host_name);
client.port=inet_addrport(&ftp.client_addr);
client.protocol="FTP";
client.user="<unknown>";
client.user=STR_UNKNOWN_USER;
client_on(sock,&client,FALSE /* update */);
if(startup->login_attempt.throttle
......
......@@ -887,7 +887,7 @@ static void pop3_thread(void* arg)
SAFECOPY(client.host,host_name);
client.port=inet_addrport(&pop3.client_addr);
client.protocol="POP3";
client.user="<unknown>";
client.user=STR_UNKNOWN_USER;
client_on(socket,&client,FALSE /* update */);
SAFEPRINTF(str,"POP3: %s", host_ip);
......@@ -2676,7 +2676,7 @@ static void smtp_thread(void* arg)
SAFECOPY(client.host,host_name);
client.port=inet_addrport(&smtp.client_addr);
client.protocol="SMTP";
client.user="<unknown>";
client.user=STR_UNKNOWN_USER;
client_on(socket,&client,FALSE /* update */);
SAFEPRINTF(str,"SMTP: %s",host_ip);
......
......@@ -5307,7 +5307,7 @@ NO_SSH:
#else
client.protocol=rlogin ? "RLogin":"Telnet";
#endif
client.user="<unknown>";
client.user=STR_UNKNOWN_USER;
client_on(client_socket,&client,FALSE /* update */);
for(i=first_node;i<=last_node;i++) {
......
/* Synchronet constants, macros, and structure definitions */
/* $Id$ */
// vi: tabstop=4
/****************************************************************************
* @format.tab-size 4 (Plain Text/Source Code File Header) *
......@@ -68,6 +69,8 @@
#define BIND_FAILURE_HELP "!Another application or service may be using this port"
#define UNKNOWN_LOAD_ERROR "Unknown load error - Library mismatch?"
#define STR_UNKNOWN_USER "<unknown user>"
#define JAVASCRIPT_MAX_BYTES (8*1024*1024)
#define JAVASCRIPT_CONTEXT_STACK (16*1024)
#define JAVASCRIPT_TIME_LIMIT (24*60*600) /* in 100ms ticks */
......
......@@ -615,7 +615,7 @@ js_client_add(JSContext *cx, uintN argc, jsval *arglist)
client.size=sizeof(client);
client.protocol=service_client->service->protocol;
client.time=time32(NULL);
client.user="<unknown>";
client.user=STR_UNKNOWN_USER;
SAFECOPY(client.host,client.user);
sock=js_socket(cx,argv[0]);
......@@ -668,7 +668,7 @@ js_client_update(JSContext *cx, uintN argc, jsval *arglist)
memset(&client,0,sizeof(client));
client.size=sizeof(client);
client.protocol=service_client->service->protocol;
client.user="<unknown>";
client.user=STR_UNKNOWN_USER;
SAFECOPY(client.host,client.user);
sock=js_socket(cx,argv[0]);
......@@ -1064,7 +1064,7 @@ static void js_service_thread(void* arg)
SAFECOPY(client.host,host_name);
client.port=inet_addrport(&service_client.addr);
client.protocol=service->protocol;
client.user="<unknown>";
client.user=STR_UNKNOWN_USER;
service_client.client=&client;
/* Initialize client display */
......@@ -1401,7 +1401,7 @@ static void native_service_thread(void* arg)
SAFECOPY(client.host,host_name);
client.port=inet_addrport(&service_client.addr);
client.protocol=service->protocol;
client.user="<unknown>";
client.user=STR_UNKNOWN_USER;
#ifdef _WIN32
if(!DuplicateHandle(GetCurrentProcess(),
......
......@@ -91,7 +91,7 @@ static const char* error_404="404 Not Found";
static const char* error_416="416 Requested Range Not Satisfiable";
static const char* error_500="500 Internal Server Error";
static const char* error_503="503 Service Unavailable\r\nConnection: close\r\nContent-Length: 0\r\n\r\n";
static const char* unknown="<unknown>";
static const char* unknown=STR_UNKNOWN_USER;
static int len_503 = 0;
#define TIMEOUT_THREAD_WAIT 60 /* Seconds */
......
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