Compare commits

..

No commits in common. "99d48344b775b5eb0c38729c09eccb897ddb0b95" and "21e3dccbac2c68f83170d32b7d660e351a0beb39" have entirely different histories.

47 changed files with 5642 additions and 3652 deletions

2129
6pack.c

File diff suppressed because it is too large Load Diff

12
ARDOP.c
View File

@ -880,17 +880,6 @@ static size_t ExtProc(int fn, int port, PDATAMESSAGE buff)
}
}
// Check ATTACH time limit
if (STREAM->Attached)
{
if (STREAM->AttachTime && TNC->AttachTimeLimit && time(NULL) > (TNC->AttachTimeLimit + STREAM->AttachTime))
{
STREAM->ReportDISC = 1;
STREAM->AttachTime = 0;
}
}
if (TNC->ARDOPCommsMode != 'T') // S I or E
{
ARDOPSCSCheckRX(TNC);
@ -1201,7 +1190,6 @@ static size_t ExtProc(int fn, int port, PDATAMESSAGE buff)
Debugprintf("ARDOP New Attach Stream %d DEDStream %d", Stream, STREAM->DEDStream);
STREAM->Attached = TRUE;
STREAM->AttachTime = time(NULL);
calllen = ConvFromAX25(TNC->PortRecord->ATTACHEDSESSIONS[Stream]->L4USER, TNC->Streams[Stream].MyCall);
TNC->Streams[Stream].MyCall[calllen] = 0;

View File

@ -158,7 +158,6 @@ char MailPage[] = "<html><head><title>%s's BBS Web Server</title>"
"<td><a href=/Mail/Wel?%s>Welcome Msgs & Prompts</a></td>"
"<td><a href=/Mail/HK?%s>Housekeeping</a></td>"
"<td><a href=/Mail/WP?%s>WP Update</a></td>"
"<td><a href=/Webmail>WebMail</a></td>"
"<td><a href=/>Node Menu</a></td>"
"</tr></table>";
@ -179,7 +178,6 @@ char RefreshMainPage[] = "<html><head>"
"<td><a href=/Mail/Wel?%s>Welcome Msgs & Prompts</a></td>"
"<td><a href=/Mail/HK?%s>Housekeeping</a></td>"
"<td><a href=/Mail/WP?%s>WP Update</a></td>"
"<td><a href=/Webmail>WebMail</a></td>"
"<td><a href=/>Node Menu</a></td>"
"</tr></table>";
@ -1889,7 +1887,6 @@ VOID SaveFwdCommon(struct HTTPConnectionInfo * Session, char * MsgPtr, char * Re
GetCheckBox(input, "WarnNoRoute=", &WarnNoRoute);
GetCheckBox(input, "LocalTime=", &Localtime);
GetCheckBox(input, "SendPtoMultiple=", &SendPtoMultiple);
GetCheckBox(input, "FourCharCont=", &FOURCHARCONT);
// Reinitialise Aliases
@ -2719,7 +2716,6 @@ VOID SendFwdMainPage(char * Reply, int * RLen, char * Key)
(WarnNoRoute) ? CHKD : UNC,
(Localtime) ? CHKD : UNC,
(SendPtoMultiple) ? CHKD : UNC,
(FOURCHARCONT) ? CHKD : UNC,
ALIASES);
}

View File

@ -213,7 +213,6 @@ BOOL UserCantKillT = FALSE;
typedef int (WINAPI FAR *FARPROCX)();
FARPROCX pRunEventProgram;
FARPROCX pGetPortFrequency;
int RunEventProgram(char * Program, char * Param);
@ -9681,7 +9680,6 @@ VOID SaveConfig(char * ConfigName)
SaveIntValue(group, "WarnNoRoute", WarnNoRoute);
SaveIntValue(group, "Localtime", Localtime);
SaveIntValue(group, "SendPtoMultiple", SendPtoMultiple);
SaveIntValue(group, "FOURCHARCONT", FOURCHARCONT);
SaveMultiStringValue(group, "FWDAliases", AliasText);
@ -10118,8 +10116,6 @@ BOOL GetConfig(char * ConfigName)
ReaddressReceived = GetIntValue(group, "ReaddressReceived");
WarnNoRoute = GetIntValue(group, "WarnNoRoute");
SendPtoMultiple = GetIntValue(group, "SendPtoMultiple");
FOURCHARCONT = GetIntValue(group, "FOURCHARCONT");
Localtime = GetIntValue(group, "Localtime");
AliasText = GetMultiStringValue(group, "FWDAliases");
GetStringValue(group, "BBSName", BBSName);
@ -10592,24 +10588,8 @@ int Connected(int Stream)
if (SendNewUserMessage)
{
int64_t LongFreq = Freq;
char * MailBuffer = malloc(100);
if (Freq == 0 && port)
{
// Get Port Freq if available
char FreqString[256];
#ifdef WIN32
if (pGetPortFrequency)
LongFreq = pGetPortFrequency(port, FreqString);
#else
LongFreq = GetPortFrequency(port, FreqString);
#endif
}
Length += sprintf(MailBuffer, "New User %s Connected to Mailbox on Port %d Freq %d Mode %ld\r\n", callsign, port, LongFreq, Mode);
Length += sprintf(MailBuffer, "New User %s Connected to Mailbox on Port %d Freq %d Mode %d\r\n", callsign, port, Freq, Mode);
sprintf(Title, "New User %s", callsign);
@ -11762,205 +11742,92 @@ BOOL CheckforMIME(SocketConn * sockptr, char * Msg, char ** Body, int * MsgLen);
#include <sys/wait.h>
#include <signal.h>
// G8BPQ Version of Steve G7TAJ's code
int pgret = 9999;
int pindex = 0;
void sigchild_handler(int sig , siginfo_t * siginfo, void * ucontext)
typedef struct _POPENRET
{
/* • SIGCHLD fills in si_pid, si_uid, si_status, si_utime, and
si_stime, providing information about the child. The si_pid
field is the process ID of the child; si_uid is the child's
real user ID. The si_status field contains the exit status of
the child (if si_code is CLD_EXITED), or the signal number
that caused the process to change state.
FILE * fp;
pid_t pid;
} POPENRET;
/*
* Check if the PG is still running after 5 sec
* if so, kill it
*/
// printf("SIGCHLD PID %d Code %d status %d\n", siginfo->si_pid, siginfo->si_code, siginfo->si_status);
pgret = siginfo->si_status;
void run_pgTimeoutThread( pid_t process )
{
printf("watchdog thread: PID of subprocess: %d\n", process);
fflush(stdout);
Sleep(5000);
// if still running PID (?) then kill.
if ( getpgid(process) >= 0 )
{
Debugprintf("watchdog thread: Still running, so killing %d ... ", process);
if ( kill( -process, SIGKILL ) == 0 )
Debugprintf("Killed PG watchdog Process %d", process);
else
Debugprintf("Failed to kill PG watchdog Process %d", process);
}
Debugprintf("watchdog thread: PID=%d Exit", process);
fflush(stdout);
//return;
}
void run_pg(CIRCUIT * conn, struct UserInfo * user)
//https://sources.debian.org/src/cron/3.0pl1-45/popen.c/
POPENRET my_popen(char *program, char *type, CIRCUIT *conn)
{
register char *cp;
FILE *iop;
int argc, pdes[2];
pid_t pid;
POPENRET PRET;
pgret = 9999;
int index = user->Temp->PG_INDEX;
if (*type != 'r' && *type != 'w' || type[1])
return(PRET);
if (pipe(pdes) < 0)
return(PRET);
iop = NULL;
conn->InputBuffer[conn->InputLen] = 0;
strlop(conn->InputBuffer, 13);
conn->InputLen = 0;
if (!user->Temp->RUNPGPARAMS)
user->Temp->RUNPGPARAMS = (RUNPGARGS_PTR) zalloc(sizeof(RUNPGARGS));
user->Temp->RUNPGPARAMS->user = user;
user->Temp->RUNPGPARAMS->conn = conn;
strncpy(user->Temp->RUNPGPARAMS->InputBuffer, conn->InputBuffer, 80); // needs to be length of actual input!
user->Temp->RUNPGPARAMS->Len = conn->InputLen;
if (conn == 0 || user == 0)
{
Debugprintf("run_pg conn or user null");
return;
}
// Build command line. Parmas are:
// - Callsign (format as F6FBB-8).
// - Level number (0 is the first time, up to 99).
// - Flags of the user (binary number as user`s mask of INIT.SRV).
// - Record number of the user in INF.SYS.
// - Received data (each word is a new argument).
// BPQ doesn't support params 3 and 4 (but may supply copy of user record later)
char cmd[20];
char *ptr = cmd;
char pg_dir[MAX_PATH];
char log_file[50] = "pg.log";
char call[10];
char data[80];
char line[80];
size_t bufsize = 80;
strcpy(pg_dir, BaseDir);
strcat(pg_dir, "/PG/");
sprintf(cmd, "./%s", SERVERLIST[user->Temp->PG_SERVER][1] );
sprintf(line, "%s%s", pg_dir, SERVERLIST[user->Temp->PG_SERVER][1]);
// printf("PG Prog %s%s\n", pg_dir, SERVERLIST[user->Temp->PG_SERVER][1]);
// check file exists and is executable
if (access(line, F_OK) == -1 || access(line, X_OK) == -1)
{
Debugprintf("%s FileNotFound || not executable", line);
BBSputs(conn, "Error running PG Server\r");
conn->InputMode=0;
SendPrompt(conn, user);
return;
}
strcpy(call, conn->UserPointer->Call);
index = user->Temp->PG_INDEX;
// remove ';' from input for security reasons
ptr = strchr(user->Temp->RUNPGPARAMS->InputBuffer, ';');
if (ptr)
*ptr = '\0';
sprintf(data, "%s %d 0 0 %s", call, index, user->Temp->RUNPGPARAMS->InputBuffer);
// printf("PG Params %s\n", data);
conn->InputBufferLen = 0;
char buf[256];
sprintf (buf, "%s %s", line, data); // buf is command to exec
// printf ("PG exec cmd %s\n", buf);
// Create pipe for reading PG program STDOUT
if (pipe(pdes) < 0)
{
Debugprintf("run_pg pipe failed");
BBSputs(conn, "Error running PG Server (pipe() failed)\r");
conn->InputMode=0;
SendPrompt(conn, user);
return;
}
// We will just fork and execute program. For now don't create a new thread
// Trap sigchild so we can tell when it exits and get return code
struct sigaction act;
memset(&act, 0, sizeof(struct sigaction));
act.sa_flags = SA_RESETHAND | SA_SIGINFO; // Restore default handler when called
act.sa_sigaction = sigchild_handler;
sigaction(SIGCHLD, &act, NULL);
switch(pid = fork())
{
switch(pid = fork()) {
case -1: /* error */
(void)close(pdes[0]);
(void)close(pdes[1]);
Debugprintf("run_pg fork failed");
BBSputs(conn, "Error running PG Server (fork() failed)\r");
conn->InputMode=0;
SendPrompt(conn, user);
return;
return PRET;
case 0: /* child */
if (pdes[1] != 1)
{
if (*type == 'r') {
if (pdes[1] != 1) {
dup2(pdes[1], 1);
dup2(pdes[1], 2);
(void)close(pdes[1]);
}
(void)close(pdes[0]);
setpgid(0, pid);
char *args[] = {"sh", "-c", buf, NULL};
} else {
if (pdes[0] != 0) {
dup2(pdes[0], 0);
(void)close(pdes[0]);
}
(void)close(pdes[1]);
}
setpgid(-pid,pid);
char *args[] = {"sh", "-c", program, NULL};
execve("/bin/sh", args, NULL);
_exit(1);
}
/* parent */
// printf("child PID %d\n", pid);
_beginthread((void (*)(void *))run_pgTimeoutThread, 0, (VOID *) pid );
struct timespec duration;
duration.tv_sec = 5;
duration.tv_nsec = 0;
nanosleep(&duration, &duration); // Will be interrupted by SIGCHLD
// printf("PG retcode %d\n", pgret);
if (pgret == 9999) // Process still running
{
BBSputs(conn, "PG Program Looping\r");
kill(pid, SIGKILL);
user->Temp->PG_INDEX = 0;
conn->InputMode=0;
SendPrompt(conn, user);
return;
}
if (pgret > 127)
{
// Probably killed by signal
int err = pgret - 128;
char errmsg[256];
sprintf(errmsg, "PG Signal %s received\n", strsignal(err));
BBSputs(conn, errmsg);
user->Temp->PG_INDEX = 0;
conn->InputMode=0;
SendPrompt(conn, user);
return;
}
// Send STDOUT from PG program to BBS user
iop = fdopen(pdes[0], "r");
if (*type == 'r') {
iop = fdopen(pdes[0], type);
(void)close(pdes[1]);
} else {
iop = fdopen(pdes[1], type);
(void)close(pdes[0]);
}
char buffer[128];
while (fgets(buffer, sizeof(buffer), iop) != NULL)
@ -11968,52 +11835,210 @@ void run_pg(CIRCUIT * conn, struct UserInfo * user)
BBSputs(conn, buffer);
buffer[0] = '\0';
}
PRET.fp = iop;
PRET.pid= pid;
switch (pgret)
return(PRET);
}
int
my_pclose( POPENRET pret )
{
register int fdes;
sigset_t omask, mask;
int stat_loc;
pid_t pid;
FILE * iop = pret.fp;
fdes = fileno(iop);
(void)fclose(iop);
sigemptyset(&mask);
sigaddset(&mask, SIGQUIT);
sigaddset(&mask, SIGINT);
sigaddset(&mask, SIGHUP);
sigprocmask(SIG_BLOCK, &mask, &omask);
pid = waitpid(pret.pid, &stat_loc, 0);
sigprocmask(SIG_SETMASK, &omask, NULL);
if (pid == -1 || !WIFEXITED(stat_loc))
return -1;
return stat_loc;
}
int run_server (char **cmd, int nb_cmd, int mode, char *log, char *pgdir, char *data, CIRCUIT * conn)
{
int i;
int ret = 0;
FILE *fp;
POPENRET PRET;
pid_t pid;
char *ptr;
char file[256];
char buf[256];
char dir[256];
char arg[256];
if (mode)
// sprintf (file, " >>%s", log);
// sprintf (file, " | tee -a %s", log);
sprintf(file, "" );
else
sprintf (file, " </dev/null");
if (pgdir)
{
case -1: // ERROR or forced closed
case 0:
index=0; // Goodbye/Exit
conn->InputMode=0;
SendPrompt(conn, user);
break;
case 1:
index++; // inc & keep in PG
break;
/* remove ';' security reasons */
ptr = strchr(pgdir, ';');
if (ptr)
*ptr = '\0';
case 2:
sprintf (dir, "cd %s ; ", pgdir);
}
else
*dir = '\0';
index=0; // disconnect
conn->InputMode=0;
Disconnect(conn->BPQStream);
break;
*arg = '\0';
case 3:
Debugprintf("data->BBS & end");
break;
if (data)
{
/* remove ';' security reasons */
ptr = strchr(data, ';');
if (ptr)
*ptr = '\0';
case 4:
Debugprintf("data->BBS and inc %d", pindex++);
break;
case 5:
Debugprintf("call no inc %d", pgret);
break;
sprintf (arg, " %s ", data);
}
default:
BBSputs(conn, "PG unexexpected response\r");
user->Temp->PG_INDEX = 0;
for (i = 0; i < nb_cmd; i++)
{
/* remove ';' security reasons */
ptr = strchr(cmd[i], ';');
if (ptr)
*ptr = '\0';
sprintf (buf, "%s%s%s%s", dir, cmd[i], arg, file);
PRET = my_popen (buf, "r", conn);
if (PRET.fp == NULL)
Debugprintf ("Failed to run PG command %s\n", cmd[i] );
ret = my_pclose( PRET );
ret = ret >> 8;
if (verbose) {
Debugprintf ("Debug: command = {%s}\n", buf);
Debugprintf ("Debug: exit code = %d\n", ret);
}
/* fail-safe bypass if executable isn't found (exit code 127) (was ret ==127)*/
if (ret > 5) // should never be more than 5
ret = 0;
}
return ( ret );
}
void run_pg( CIRCUIT * conn, struct UserInfo * user )
{
if (!user->Temp->RUNPGPARAMS) {
user->Temp->RUNPGPARAMS = (RUNPGARGS_PTR) zalloc(sizeof(RUNPGARGS));
}
user->Temp->RUNPGPARAMS->user = user;
user->Temp->RUNPGPARAMS->conn = conn;
strncpy(user->Temp->RUNPGPARAMS->InputBuffer, conn->InputBuffer, 80); // needs to be length of actual input!
user->Temp->RUNPGPARAMS->Len = conn->InputLen;
if ( conn == 0 || user == 0 ) {
Debugprintf("run_pg null err");
return;
}
_beginthread((void (*)(void *))startrun_pgThread, 0, user->Temp->RUNPGPARAMS );
return;
}
void startrun_pgThread( RUNPGARGS_PTR Args ) {
CIRCUIT * conn = Args->conn;
struct UserInfo * user = Args->user;
char cmd[20];
sprintf( cmd, "./%s", SERVERLIST[user->Temp->PG_SERVER][1] );
char *ptr = cmd;
char pg_dir[MAX_PATH];
char log_file[50] = "pg.log";
char call[6];
char data[80];
char line[80];
char *line_ptr = line;
int index;
char *data_ptr = data;
size_t bufsize = 80;
strcpy(pg_dir, BaseDir);
strcat(pg_dir, "/PG/");
sprintf(line, "%s%s", pg_dir, SERVERLIST[user->Temp->PG_SERVER][1]);
// check file exists and is executable
if (access(line, F_OK) == -1 || access(line, X_OK) == -1) {
Debugprintf("%s FileNotFound || Not EXE", line);
BBSputs(conn, "Error running PG Server\r");
conn->InputMode=0;
SendPrompt(conn, user);
return;
}
user->Temp->PG_INDEX = index;
strcpy( call, conn->UserPointer->Call);
// sprintf( log_file, "%s-%d.log", call, conn);
index = user->Temp->PG_INDEX;
// printf("runpg return index = %d\n", index);
line[0] = '\0';
int Len = Args->Len;
UCHAR * Msg = Args->InputBuffer;
strncpy( line, Msg, Len);
line[ Len - 1 ] = 0; //remove LF
sprintf( data, "%s %d 0 0 %s", call, index, line);
// clear the input queue
conn->InputLen = 0;
conn->InputBufferLen = 0;
int ret = run_server (&ptr, 1, 1, log_file, pg_dir, data_ptr, conn);
switch (ret)
{
case -1: // ERROR or forced closed
case 0: index=0; // Goodbye/Exit
conn->InputMode=0;
SendPrompt(conn, user);
break;
case 1: index++; // inc & keep in PG
break;
case 2: index=0; // disconnect
conn->InputMode=0;
Disconnect(conn->BPQStream);
break;
case 3: Debugprintf("data->BBS & end");
break;
case 4: Debugprintf("data->BBS and inc %d", index++);
break;
case 5: Debugprintf("call no inc %d", ret);
break;
}
user->Temp->PG_INDEX=index;
}
/*---- G7TAJ END ----- */
#else
@ -12034,7 +12059,7 @@ void ReadFromPipe(void);
void run_pg( CIRCUIT * conn, struct UserInfo * user )
{
// Run PG program, read anything from program's stdout to the user
// Run PG program, rend anything from program's stdout to the user
int retcode = -1;
SECURITY_ATTRIBUTES saAttr;
@ -12209,7 +12234,7 @@ void run_pg( CIRCUIT * conn, struct UserInfo * user )
case 4:
// Send Output to BBS - was done above
// Send Output to BBS - was down above
break;
case 5:
@ -12613,6 +12638,7 @@ VOID ProcessLine(CIRCUIT * conn, struct UserInfo * user, char* Buffer, int len)
#endif
return;
}
if (_memicmp(Cmd, "Node", 4) == 0)
{
ExpandAndSendMessage(conn, SignoffMsg, LOG_BBS);
@ -15731,9 +15757,7 @@ VOID GetPGConfig()
strcat(FN, "PG/PGList.txt");
if ((file = fopen(FN, "r")) == NULL)
{
return;
}
while(fgets(buf, 255, file) != NULL)
{
@ -15761,7 +15785,6 @@ VOID GetPGConfig()
break;
}
NUM_SERVERS = n;
fclose(file);

View File

@ -0,0 +1,65 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioUserFile
ProjectType="Visual C++"
Version="8.00"
ShowAllFiles="false"
>
<Configurations>
<Configuration
Name="Debug|Win32"
>
<DebugSettings
Command="$(TargetPath)"
WorkingDirectory=""
CommandArguments=""
Attach="false"
DebuggerType="3"
Remote="1"
RemoteMachine="LAPTOP-Q6S4RP5Q"
RemoteCommand=""
HttpUrl=""
PDBPath=""
SQLDebugging=""
Environment=""
EnvironmentMerge="true"
DebuggerFlavor=""
MPIRunCommand=""
MPIRunArguments=""
MPIRunWorkingDirectory=""
ApplicationCommand=""
ApplicationArguments=""
ShimCommand=""
MPIAcceptMode=""
MPIAcceptFilter=""
/>
</Configuration>
<Configuration
Name="Release|Win32"
>
<DebugSettings
Command="$(TargetPath)"
WorkingDirectory=""
CommandArguments=""
Attach="false"
DebuggerType="3"
Remote="1"
RemoteMachine="LAPTOP-Q6S4RP5Q"
RemoteCommand=""
HttpUrl=""
PDBPath=""
SQLDebugging=""
Environment=""
EnvironmentMerge="true"
DebuggerFlavor=""
MPIRunCommand=""
MPIRunArguments=""
MPIRunWorkingDirectory=""
ApplicationCommand=""
ApplicationArguments=""
ShimCommand=""
MPIAcceptMode=""
MPIAcceptFilter=""
/>
</Configuration>
</Configurations>
</VisualStudioUserFile>

View File

@ -0,0 +1,65 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioUserFile
ProjectType="Visual C++"
Version="8.00"
ShowAllFiles="false"
>
<Configurations>
<Configuration
Name="Debug|Win32"
>
<DebugSettings
Command="$(TargetPath)"
WorkingDirectory=""
CommandArguments=""
Attach="false"
DebuggerType="3"
Remote="1"
RemoteMachine="SKIGACER"
RemoteCommand=""
HttpUrl=""
PDBPath=""
SQLDebugging=""
Environment=""
EnvironmentMerge="true"
DebuggerFlavor=""
MPIRunCommand=""
MPIRunArguments=""
MPIRunWorkingDirectory=""
ApplicationCommand=""
ApplicationArguments=""
ShimCommand=""
MPIAcceptMode=""
MPIAcceptFilter=""
/>
</Configuration>
<Configuration
Name="Release|Win32"
>
<DebugSettings
Command="$(TargetPath)"
WorkingDirectory=""
CommandArguments=""
Attach="false"
DebuggerType="3"
Remote="1"
RemoteMachine="SKIGACER"
RemoteCommand=""
HttpUrl=""
PDBPath=""
SQLDebugging=""
Environment=""
EnvironmentMerge="true"
DebuggerFlavor=""
MPIRunCommand=""
MPIRunArguments=""
MPIRunWorkingDirectory=""
ApplicationCommand=""
ApplicationArguments=""
ShimCommand=""
MPIAcceptMode=""
MPIAcceptFilter=""
/>
</Configuration>
</Configurations>
</VisualStudioUserFile>

Binary file not shown.

View File

@ -1133,11 +1133,6 @@
// Fix possible failure to update last listed count when user disconnects without using B command
// Add short random delay (<30 secs) when forward new Messages immediately is enabled (35)
// Fix Connect Script IDLETIME (38)
// Add "Mail Mgmt" to Webmail menu bar and "WebMail" to Mail Mgmt Menu (39)
// Improve "New User" frequency determination (39)
// Allow selection of 2 or 4 character country codes for forward processing (39)
// Fix Send P to multiple BBS's when routing on HR (40)
// Rewrite PG server code on Lunux (41)
#include "bpqmail.h"
#include "winstdint.h"
@ -1155,7 +1150,6 @@ FARPROCX pDllBPQTRACE;
FARPROCZ pGetLOC;
FARPROCX pRefreshWebMailIndex;
FARPROCX pRunEventProgram;
FARPROCX pGetPortFrequency;
BOOL WINE = FALSE;
@ -1930,8 +1924,6 @@ BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
pGetLOC = GetProcAddress(ExtDriver,"_GetLOC@0");
pRefreshWebMailIndex = GetProcAddress(ExtDriver,"_RefreshWebMailIndex@0");
pRunEventProgram = GetProcAddress(ExtDriver,"_RunEventProgram@8");
pGetPortFrequency = GetProcAddress(ExtDriver,"_GetPortFrequency@8");
if (pGetLOC)
{

View File

@ -387,16 +387,16 @@ BEGIN
CONTROL "Warn if no route for P or T",IDC_WARNNOROUTE,"Button",
BS_AUTOCHECKBOX | BS_LEFTTEXT | BS_MULTILINE |
WS_TABSTOP,5,101,103,8
LTEXT "Aliases",IDC_STATIC,5,165,57,13
EDITTEXT IDC_ALIAS,4,183,99,81,ES_MULTILINE | ES_UPPERCASE |
LTEXT "Aliases",IDC_STATIC,5,144,57,13
EDITTEXT IDC_ALIAS,4,162,99,81,ES_MULTILINE | ES_UPPERCASE |
ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_WANTRETURN |
WS_VSCROLL
CONTROL "Readdress Locally Input",IDC_READDRESSLOCAL,"Button",
BS_AUTOCHECKBOX | BS_LEFTTEXT | BS_MULTILINE |
WS_DISABLED | WS_TABSTOP,4,267,97,8
WS_DISABLED | WS_TABSTOP,4,246,97,8
CONTROL "Readdress Received",IDC_READDRESSRXED,"Button",
BS_AUTOCHECKBOX | BS_LEFTTEXT | BS_MULTILINE |
WS_DISABLED | WS_TABSTOP,4,281,97,8
WS_DISABLED | WS_TABSTOP,4,260,97,8
GROUPBOX "Per-BBS Params",IDC_STATIC,121,33,326,263
LTEXT "BBS",IDC_STATIC,128,46,57,10
COMBOBOX IDC_BBS,122,59,50,60,CBS_SIMPLE | CBS_OEMCONVERT |
@ -471,9 +471,6 @@ BEGIN
WS_TABSTOP,5,130,103,8
LTEXT "Incoming Connect Timeout",IDC_STATIC,125,278,95,12
EDITTEXT IDC_CONTIMEOUT,219,276,22,12,ES_AUTOHSCROLL
CONTROL "Use 4 Char Continent Codes",IDC_FOURCHARCONTINENT,
"Button",BS_AUTOCHECKBOX | BS_LEFTTEXT | BS_MULTILINE |
WS_TABSTOP,6,146,103,8
END
IDD_USERADDED_BOX DIALOG DISCARDABLE 176, 132, 129, 68

View File

@ -1,20 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 9.00
# Visual C++ Express 2005
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BPQMail", "BPQMail.vcproj", "{3766AA10-C777-4ED8-A83D-F1452DE9B665}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{3766AA10-C777-4ED8-A83D-F1452DE9B665}.Debug|Win32.ActiveCfg = Debug|Win32
{3766AA10-C777-4ED8-A83D-F1452DE9B665}.Debug|Win32.Build.0 = Debug|Win32
{3766AA10-C777-4ED8-A83D-F1452DE9B665}.Release|Win32.ActiveCfg = Release|Win32
{3766AA10-C777-4ED8-A83D-F1452DE9B665}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

4
BPQMail.vcxproj.user Normal file
View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
</Project>

View File

@ -1867,7 +1867,6 @@ VOID SaveFWDConfig(HWND hDlg)
MaxRXSize = GetDlgItemInt(hDlg, IDC_MAXRECV, &OK, FALSE);
MaxAge = GetDlgItemInt(hDlg, IDC_MAXAGE, &OK, FALSE);
SendPtoMultiple = IsDlgButtonChecked(hDlg, IDC_MULTIP);
FOURCHARCONT = IsDlgButtonChecked(hDlg, IDC_FOURCHARCONTINENT);
// Reinitialise Aliases
@ -3250,7 +3249,6 @@ INT_PTR CALLBACK FwdEditDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARA
CheckDlgButton(hDlg, IDC_WARNNOROUTE, WarnNoRoute);
CheckDlgButton(hDlg, IDC_USELOCALTIME, Localtime);
CheckDlgButton(hDlg, IDC_MULTIP, SendPtoMultiple);
CheckDlgButton(hDlg, IDC_FOURCHARCONTINENT, FOURCHARCONT);
CurrentBBS = NULL;

View File

@ -319,7 +319,6 @@
#define ID_MULTICAST 40024
#define IDC_DEFAULTNOWINLINK 41001
#define IDC_MULTIP 41002
#define IDC_FOURCHARCONTINENT 41003
// Next default values for new objects
//

10
Bpq32.c
View File

@ -1217,12 +1217,6 @@ along with LinBPQ/BPQ32. If not, see http://www.gnu.org/licenses
// Fix potential buffer overflow in Telnet login (36)
// Allow longer serial device names (37)
// Fix ICF8101 Mode setting (37)
// Kill link if we are getting repeated RR(F) after timeout
// (Indicating other station is seeing our RR(P) but not the resent I frame) (40)
// Change default of SECURETELNET to 1 (41)
// Add optional ATTACH time limit for ARDOP (42)
// Fix buffer overflow risk in HTTP Terminal(42)
#define CKernel
@ -1316,7 +1310,6 @@ void * KISSHFExtInit(EXTPORTDATA * PortEntry);
void * WinRPRExtInit(EXTPORTDATA * PortEntry);
void * HSMODEMExtInit(EXTPORTDATA * PortEntry);
void * FreeDataExtInit(EXTPORTDATA * PortEntry);
void * SIXPACKExtInit(EXTPORTDATA * PortEntry);
extern char * ConfigBuffer; // Config Area
VOID REMOVENODE(dest_list * DEST);
@ -3954,9 +3947,6 @@ VOID * InitializeExtDriver(PEXTPORTDATA PORTVEC)
if (strstr(Value, "FREEDATA"))
return FreeDataExtInit;
if (strstr(Value, "6PACK"))
return SIXPACKExtInit;
ExtDriver = LoadLibrary(Value);
if (ExtDriver == NULL)

View File

@ -57,7 +57,7 @@
UsePrecompiledHeader="0"
AssemblerOutput="2"
AssemblerListingLocation="c:\devprogs\bpq32\listings\debug\"
BrowseInformation="1"
BrowseInformation="0"
WarningLevel="3"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="4"
@ -234,10 +234,6 @@
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath=".\6pack.c"
>
</File>
<File
RelativePath="..\CommonSource\adif.c"
>

View File

@ -0,0 +1,65 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioUserFile
ProjectType="Visual C++"
Version="8.00"
ShowAllFiles="false"
>
<Configurations>
<Configuration
Name="Debug|Win32"
>
<DebugSettings
Command="C:\Devprogs\BPQ32\bpq32.exe"
WorkingDirectory=""
CommandArguments=""
Attach="false"
DebuggerType="3"
Remote="1"
RemoteMachine="NOTTSDESKTOP"
RemoteCommand=""
HttpUrl=""
PDBPath=""
SQLDebugging=""
Environment=""
EnvironmentMerge="true"
DebuggerFlavor=""
MPIRunCommand=""
MPIRunArguments=""
MPIRunWorkingDirectory=""
ApplicationCommand=""
ApplicationArguments=""
ShimCommand=""
MPIAcceptMode=""
MPIAcceptFilter=""
/>
</Configuration>
<Configuration
Name="Release|Win32"
>
<DebugSettings
Command=""
WorkingDirectory=""
CommandArguments=""
Attach="false"
DebuggerType="3"
Remote="1"
RemoteMachine="NOTTSDESKTOP"
RemoteCommand=""
HttpUrl=""
PDBPath=""
SQLDebugging=""
Environment=""
EnvironmentMerge="true"
DebuggerFlavor=""
MPIRunCommand=""
MPIRunArguments=""
MPIRunWorkingDirectory=""
ApplicationCommand=""
ApplicationArguments=""
ShimCommand=""
MPIAcceptMode=""
MPIAcceptFilter=""
/>
</Configuration>
</Configurations>
</VisualStudioUserFile>

View File

@ -0,0 +1,65 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioUserFile
ProjectType="Visual C++"
Version="8.00"
ShowAllFiles="false"
>
<Configurations>
<Configuration
Name="Debug|Win32"
>
<DebugSettings
Command="C:\DevProgs\BPQ32\bpq32.exe"
WorkingDirectory=""
CommandArguments=""
Attach="false"
DebuggerType="3"
Remote="1"
RemoteMachine="SKIGACER"
RemoteCommand=""
HttpUrl=""
PDBPath=""
SQLDebugging=""
Environment=""
EnvironmentMerge="true"
DebuggerFlavor=""
MPIRunCommand=""
MPIRunArguments=""
MPIRunWorkingDirectory=""
ApplicationCommand=""
ApplicationArguments=""
ShimCommand=""
MPIAcceptMode=""
MPIAcceptFilter=""
/>
</Configuration>
<Configuration
Name="Release|Win32"
>
<DebugSettings
Command="C:\DevProgs\BPQ32\bpq32.exe"
WorkingDirectory=""
CommandArguments=""
Attach="false"
DebuggerType="3"
Remote="1"
RemoteMachine="SKIGACER"
RemoteCommand=""
HttpUrl=""
PDBPath=""
SQLDebugging=""
Environment=""
EnvironmentMerge="true"
DebuggerFlavor=""
MPIRunCommand=""
MPIRunArguments=""
MPIRunWorkingDirectory=""
ApplicationCommand=""
ApplicationArguments=""
ShimCommand=""
MPIAcceptMode=""
MPIAcceptFilter=""
/>
</Configuration>
</Configurations>
</VisualStudioUserFile>

View File

@ -37,7 +37,7 @@
Name="Release|Win32"
>
<DebugSettings
Command=""
Command="C:\DevProgs\BPQ32\bpq32.exe"
WorkingDirectory=""
CommandArguments=""
Attach="false"

View File

@ -4859,6 +4859,7 @@ DllExport uint64_t APIENTRY GetPortFrequency(int PortNo, char * FreqString)
struct TNCINFO * TNC;
struct RIGINFO * RIG = 0;
int RigPort;
if (PORT->RIGPort)
TNC = TNCInfo[PORT->RIGPort];
@ -5088,8 +5089,6 @@ void BuildPortMH(char * MHJSON, struct PORTCONTROL * PORT)
int len;
char * ptr;
char mhstr[400];
int i;
char c;
if (MH == NULL)
return;
@ -5111,16 +5110,7 @@ void BuildPortMH(char * MHJSON, struct PORTCONTROL * PORT)
continue;
}
// validate call to prevent corruption of json
for (i=0; i < len; i++)
{
c = Normcall[i];
if (!isalnum(c) && !(c == '#') && !(c == ' ') && !(c == '-'))
goto skipit;
}
Normcall[len++] = 0;
//format TIME
@ -5133,7 +5123,7 @@ void BuildPortMH(char * MHJSON, struct PORTCONTROL * PORT)
Normcall, PORT->PORTNUMBER, MH->MHCOUNT, MHTIME);
strcat( MHJSON, mhstr );
skipit:
MH++;
}
}

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
</Project>

View File

@ -1876,8 +1876,6 @@ int standardParams(struct TNCINFO * TNC, char * buf)
TNC->WL2K = DecodeWL2KReportLine(buf);
else if (_memicmp(buf, "SESSIONTIMELIMIT", 16) == 0)
TNC->SessionTimeLimit = TNC->DefaultSessionTimeLimit = atoi(&buf[17]) * 60;
else if (_memicmp(buf, "ATTACHTIMELIMIT", 15) == 0)
TNC->AttachTimeLimit = atoi(&buf[16]) * 60;
else if (_memicmp(buf, "BUSYHOLD", 8) == 0) // Hold Time for Busy Detect
TNC->BusyHold = atoi(&buf[8]);
else if (_memicmp(buf, "BUSYWAIT", 8) == 0) // Wait time before failing connect if busy

View File

@ -600,7 +600,6 @@ VOID HTTPTimer()
for (n = Last;;)
{
if ((strlen(Session->ScreenLines[n]) + strlen(_REPLYBUFFER)) < 99999)
strcat(_REPLYBUFFER, Session->ScreenLines[n]);
if (n == 99)
@ -681,15 +680,13 @@ struct HTTPConnectionInfo * FindSession(char * Key)
void ProcessTermInput(SOCKET sock, char * MsgPtr, int MsgLen, char * Key)
{
char _REPLYBUFFER[2048];
char _REPLYBUFFER[1024];
int ReplyLen;
char Header[256];
int HeaderLen;
int State;
struct HTTPConnectionInfo * Session = FindSession(Key);
int Stream;
int maxlen = 1000;
if (Session == NULL)
{
@ -704,24 +701,12 @@ void ProcessTermInput(SOCKET sock, char * MsgPtr, int MsgLen, char * Key)
char c;
UCHAR hex;
int msglen = end - input;
struct TNCINFO * TNC = Session->TNC;
struct TCPINFO * TCP = 0;
if (TNC)
TCP = TNC->TCPInfo;
if (TCP && TCP->WebTermCSS)
maxlen -= strlen(TCP->WebTermCSS);
if (MsgLen > maxlen)
{
Session->KillTimer = 99999; // close session
return;
}
if (TCP && TCP->WebTermCSS)
ReplyLen = sprintf(_REPLYBUFFER, InputLine, Key, TCP->WebTermCSS);
else

View File

@ -1121,7 +1121,7 @@ int main(int argc, char * argv[])
// Make backup copies of Databases
// CopyConfigFile(ConfigName);
// CopyConfigFile(ConfigName);
CopyBIDDatabase();
CopyMessageDatabase();
@ -1221,7 +1221,7 @@ int main(int argc, char * argv[])
NumberofStreams++;
// BPQSetHandle(conn->BPQStream, hWnd);
// BPQSetHandle(conn->BPQStream, hWnd);
SetAppl(conn->BPQStream, (i == 0 && EnableUI) ? 0x82 : 2, BBSApplMask);
Disconnect(conn->BPQStream);
@ -1229,7 +1229,10 @@ int main(int argc, char * argv[])
strcpy(pgm, "LINBPQ");
Debugprintf("POP3 Debug Before Init TCP Timer = %d", POP3Timer);
InitialiseTCP();
Debugprintf("POP3 Debug Before Init NNTP Timer = %d", POP3Timer);
InitialiseNNTP();
SetupListenSet(); // Master set of listening sockets
@ -1283,6 +1286,8 @@ int main(int argc, char * argv[])
}
}
Debugprintf("POP3 Debug After Mail Init Timer = %d", POP3Timer);
if (NUMBEROFTNCPORTS)
InitializeTNCEmulator();

View File

8
MailNode.vcxproj.user Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LocalDebuggerCommand>c:\linbpq\linbpq.exe</LocalDebuggerCommand>
<LocalDebuggerWorkingDirectory>c:\linbpq</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
</Project>

View File

@ -29,9 +29,9 @@ along with LinBPQ/BPQ32. If not, see http://www.gnu.org/licenses
// Bulls should not be distributed outside their designated area.
// Use 4 char continent codes if this is set
// Use 4 char continent codes if this isn't defined
int FOURCHARCONT = 0;
#define TWOCHARCONT
#include "bpqmail.h"
@ -95,21 +95,21 @@ struct Continent Continents[] =
struct Country Countries[] =
{
"AFG", "ASIA", "AS", // Afghanistan
"AFG", "****", "AS", // Afghanistan
"ALA", "EURO", "EU", // Åland Islands
"ALB", "EURO", "EU", // Albania
"DZA", "NAFR", "AF", // Algeria
"ASM", "ASIA", "AS", // American Samoa
"ASM", "****", "AS", // American Samoa
"AND", "EURO", "EU", // Andorra
"AGO", "CAFR", "AF", // Angola
"AIA", "CARB", "NA", // Anguilla
"ATG", "CARB", "NA", // Antigua and Barbuda
"ARG", "SOAM", "SA", // Argentina
"ARM", "ASIA", "AS", // Armenia
"ARM", "****", "AS", // Armenia
"ABW", "CARB", "NA", // Aruba
"AUS", "AUNZ", "OC", // Australia
"AUT", "EURO", "EU", // Austria
"AZE", "ASIA", "AS", // Azerbaijan
"AZE", "****", "AS", // Azerbaijan
"BHS", "CARB", "NA", // Bahamas
"BHR", "MDLE", "AS", // Bahrain
"BGD", "INDE", "AS", // Bangladesh
@ -122,14 +122,14 @@ struct Country Countries[] =
"BTN", "ASIA", "AS", // Bhutan
"BOL", "SOAM", "SA", // Bolivia (Plurinational State of)
"BIH", "EURO", "EU", // Bosnia and Herzegovina
"BWA", "SAFR", "AF", // Botswana
"BWA", "****", "AF", // Botswana
"BRA", "SOAM", "SA", // Brazil
"VGB", "CARB", "NA", // British Virgin Islands
"BRN", "ASIA", "AS", // Brunei Darussalam
"BGR", "EURO", "EU", // Bulgaria
"BFA", "CAFR", "AF", // Burkina Faso
"BDI", "CAFR", "AF", // Burundi
"KHM", "ASIA", "AS", // Cambodia
"KHM", "****", "AS", // Cambodia
"CMR", "CAFR", "AF", // Cameroon
"CAN", "NOAM", "NA", // Canada
"CPV", "NAFR", "AF", // Cape Verde
@ -137,12 +137,12 @@ struct Country Countries[] =
"CAF", "CAFR", "AF", // Central African Republic
"TCD", "CAFR", "AF", // Chad
"CHL", "SOAM", "SA", // Chile
"CHN", "ASIA", "AS", // China
"HKG", "ASIA", "AS", // Hong Kong Special Administrative Region of China
"MAC", "ASIA", "AS", // Macao Special Administrative Region of China
"COL", "ASIA", "SA", // Colombia
"CHN", "****", "AS", // China
"HKG", "****", "AS", // Hong Kong Special Administrative Region of China
"MAC", "****", "AS", // Macao Special Administrative Region of China
"COL", "****", "SA", // Colombia
"COM", "SAFR", "AF", // Comoros
"COG", "CAFR", "AF", // Congo
"COG", "****", "AF", // Congo
"COK", "SPAC", "OC", // Cook Islands
"CRI", "CEAM", "NA", // Costa Rica
"CIV", "CAFR", "AF", // Côte d'Ivoire
@ -150,8 +150,8 @@ struct Country Countries[] =
"CUB", "CARB", "NA", // Cuba
"CYP", "EURO", "EU", // Cyprus
"CZE", "EURO", "EU", // Czech Republic
"PRK", "ASIA", "AS", // Democratic People's Republic of Korea
"COD", "CAFR", "AF", // Democratic Republic of the Congo
"PRK", "****", "AS", // Democratic People's Republic of Korea
"COD", "****", "AF", // Democratic Republic of the Congo
"DNK", "EURO", "EU", // Denmark
"DJI", "NAFR", "AF", // Djibouti
"DMA", "CARB", "NA", // Dominica
@ -160,9 +160,9 @@ struct Country Countries[] =
"EGY", "MDLE", "AF", // Egypt
"SLV", "CEAM", "NA", // El Salvador
"GNQ", "CAFR", "AF", // Equatorial Guinea
"ERI", "NAFR", "AF", // Eritrea
"ERI", "****", "AF", // Eritrea
"EST", "EURO", "EU", // Estonia
"ETH", "NAFR", "AF", // Ethiopia
"ETH", "****", "AF", // Ethiopia
"FRO", "EURO", "EU", // Faeroe Islands
"FLK", "SOAM", "SA", // Falkland Islands (Malvinas)
"FJI", "SPAC", "OC", // Fiji
@ -192,7 +192,7 @@ struct Country Countries[] =
"HUN", "EURO", "EU", // Hungary
"ISL", "EURO", "EU", // Iceland
"IND", "INDI", "AS", // India
"IDN", "ASIA", "AS", // Indonesia
"IDN", "****", "AS", // Indonesia
"IRN", "MDLE", "AS", // Iran (Islamic Republic of)
"IRQ", "MDLE", "AS", // Iraq
"IRL", "EURO", "EU", // Ireland
@ -200,11 +200,11 @@ struct Country Countries[] =
"ISR", "MDLE", "AS", // Israel
"ITA", "EURO", "EU", // Italy
"JAM", "CEAM", "NA", // Jamaica
"JPN", "ASIA", "AS", // Japan
"JPN", "****", "AS", // Japan
"JEY", "EURO", "EU", // Jersey
"JOR", "MDLE", "AS", // Jordan
"KAZ", "ASIA", "AS", // Kazakhstan
"KEN", "CAFR", "AF", // Kenya
"KAZ", "****", "AS", // Kazakhstan
"KEN", "****", "AF", // Kenya
"KIR", "EPAC", "OC", // Kiribati
"KWT", "MDLE", "AS", // Kuwait
"KGZ", "ASIA", "AS", // Kyrgyzstan
@ -228,25 +228,25 @@ struct Country Countries[] =
"MRT", "NAFR", "AF", // Mauritania
"MUS", "SAFR", "AF", // Mauritius
"MYT", "SAFR", "AF", // Mayotte
"MEX", "NOAM", "NA", // Mexico
"MEX", "****", "NA", // Mexico
"FSM", "WPAC", "OC", // Micronesia (Federated States of)
"MCO", "EURO", "EU", // Monaco
"MNG", "ASIA", "AS", // Mongolia
"MNG", "****", "AS", // Mongolia
"MNE", "EURO", "EU", // Montenegro
"MSR", "CARB", "NA", // Montserrat
"MAR", "NAFR", "AF", // Morocco
"MOZ", "SAFR", "AF", // Mozambique
"MMR", "ASIA", "AS", // Myanmar
"NAM", "SAFR", "AF", // Namibia
"NAM", "****", "AF", // Namibia
"NRU", "WPAC", "OC", // Nauru
"NPL", "ASIA", "AS", // Nepal
"NPL", "****", "AS", // Nepal
"NLD", "EURO", "EU", // Netherlands
"ANT", "CARB", "NA", // Netherlands Antilles
"NCL", "SPAC", "OC", // New Caledonia
"NZL", "AUNZ", "OC", // New Zealand
"NIC", "CEAM", "SA", // Nicaragua
"NIC", "****", "SA", // Nicaragua
"NER", "NAFR", "AF", // Niger
"NGA", "CAFR", "AF", // Nigeria
"NGA", "****", "AF", // Nigeria
"NIU", "SPAC", "OC", // Niue
"NFK", "SPAC", "OC", // Norfolk Island
"MNP", "WPAC", "OC", // Northern Mariana Islands
@ -270,7 +270,7 @@ struct Country Countries[] =
"REU", "SAFR", "AF", // Réunion
"ROU", "EURO", "EU", // Romania
"RUS", "ASIA", "AS", // Russian Federation
"RWA", "CAFR", "AF", // Rwanda
"RWA", "****", "AF", // Rwanda
"BLM", "CARB", "NA", // Saint-Barthélemy
"SHN", "SOAM", "SA", // Saint Helena
"KNA", "CARB", "NA", // Saint Kitts and Nevis
@ -285,50 +285,50 @@ struct Country Countries[] =
"SEN", "CAFR", "AF", // Senegal
"SRB", "EURO", "EU", // Serbia
"SYC", "SAFR", "AF", // Seychelles
"SLE", "NAFR", "AF", // Sierra Leone
"SGP", "ASIA", "AS", // Singapore
"SLE", "****", "AF", // Sierra Leone
"SGP", "****", "AS", // Singapore
"SVK", "EURO", "EU", // Slovakia
"SVN", "EURO", "EU", // Slovenia
"SLB", "SPAC", "OC", // Solomon Islands
"SOM", "NAFR", "AF", // Somalia
"SOM", "****", "AF", // Somalia
"ZAF", "SAFR", "AF", // South Africa
"ESP", "EURO", "EU", // Spain
"LKA", "INDE", "AS", // Sri Lanka
"SDN", "NAFR", "AF", // Sudan
"SDN", "****", "AF", // Sudan
"SUR", "SOAM", "SA", // Suriname
"SJM", "EURO", "EU", // Svalbard and Jan Mayen Islands
"SWZ", "SAFR", "AF", // Swaziland
"SWZ", "****", "AF", // Swaziland
"SWE", "EURO", "EU", // Sweden
"CHE", "EURO", "EU", // Switzerland
"SYR", "MDLE", "AS", // Syrian Arab Republic
"TJK", "ASIA", "AS", // Tajikistan
"THA", "ASIA", "AS", // Thailand
"THA", "****", "AS", // Thailand
"MKD", "EURO", "EU", // The former Yugoslav Republic of Macedonia
"TLS", "ASIA", "AS", // Timor-Leste
"TGO", "CAFR", "AF", // Togo
"TKL", "AUNZ", "OC", // Tokelau
"TON", "SPAC", "OC", // Tonga
"TTO", "CARB", "NA", // Trinidad and Tobago
"TUN", "NAFR", "AF", // Tunisia
"TUN", "****", "AF", // Tunisia
"TUR", "EURO", "EU", // Turkey
"TKM", "ASIA", "AS", // Turkmenistan
"TKM", "****", "AS", // Turkmenistan
"TCA", "CARB", "NA", // Turks and Caicos Islands
"TUV", "SPAC", "OC", // Tuvalu
"UGA", "SAFR", "AF", // Uganda
"UGA", "****", "AF", // Uganda
"UKR", "EURO", "EU", // Ukraine
"ARE", "MDLE", "AS", // United Arab Emirates
"GBR", "EURO", "EU", // United Kingdom of Great Britain and Northern Ireland
"TZA", "SAFR", "AF", // United Republic of Tanzania
"TZA", "****", "AF", // United Republic of Tanzania
"USA", "NOAM", "NA", // United States of America
"VIR", "CARB", "NA", // United States Virgin Islands
"URY", "SOAM", "SA", // Uruguay
"UZB", "ASIA", "AS", // Uzbekistan
"VUT", "SPAC", "OC", // Vanuatu
"VEN", "SOAM", "SA", // Venezuela (Bolivarian Republic of)
"VNM", "ASIA", "AS", // Viet Nam
"VNM", "****", "AS", // Viet Nam
"WLF", "SPAC", "OC", // Wallis and Futuna Islands
"ESH", "CAFR", "AF", // Western Sahara
"YEM", "NAFR", "AF", // Yemen
"ESH", "****", "AF", // Western Sahara
"YEM", "****", "AF", // Yemen
"ZMB", "SAFR", "AF", // Zambia
"ZWE", "SAFR", "AF" // Zimbabwe
};
@ -339,9 +339,9 @@ struct ALIAS ** NTSAliases = NULL;
/*struct ALIAS Aliases[] =
{
"AMSAT", "WW",
"USBBS", "USA",
"ALLUS", "USA"};
"AMSAT", "WW",
"USBBS", "USA",
"ALLUS", "USA"};
*/
int NumberofContinents = sizeof(Continents)/sizeof(Continents[1]);
@ -435,8 +435,7 @@ VOID SetupMyHA()
if (MyElements[1])
{
if (FOURCHARCONT == 0)
{
#ifdef TWOCHARCONT
if (strlen(MyElements[1]) == 4)
{
// Convert to 2 char Continent;
@ -447,9 +446,7 @@ VOID SetupMyHA()
MyElements[1] = _strdup(Continent->TwoCharCode);
}
}
}
else
{
#else
if (strlen(MyElements[1]) == 2)
{
// Convert to 4 char Continent;
@ -460,7 +457,7 @@ VOID SetupMyHA()
MyElements[1] = _strdup(Continent->FourCharCode);
}
}
}
#endif
}
}
@ -582,8 +579,7 @@ VOID SetupHAElements(struct BBSForwardingInfo * ForwardingInfo)
if (ForwardingInfo->BBSHAElements[1])
{
if (FOURCHARCONT == 0)
{
#ifdef TWOCHARCONT
if (strlen(ForwardingInfo->BBSHAElements[1]) == 4)
{
// Convert to 2 char Continent;
@ -594,9 +590,7 @@ VOID SetupHAElements(struct BBSForwardingInfo * ForwardingInfo)
ForwardingInfo->BBSHAElements[1] = _strdup(Continent->TwoCharCode);
}
}
}
else
{
#else
if (strlen(ForwardingInfo->BBSHAElements[1]) == 2)
{
// Convert to 4 char Continent;
@ -607,7 +601,8 @@ VOID SetupHAElements(struct BBSForwardingInfo * ForwardingInfo)
ForwardingInfo->BBSHAElements[1] = _strdup(Continent->FourCharCode);
}
}
}
#endif
}
free(SaveHText);
@ -619,7 +614,7 @@ VOID SetupHAddreses(struct BBSForwardingInfo * ForwardingInfo)
int Count=0;
char ** HText = ForwardingInfo->Haddresses;
char * SaveHText, * ptr2;
// char * TopElement;
// char * TopElement;
char * Num;
struct Continent * Continent;
@ -676,7 +671,7 @@ VOID SetupHAddreses(struct BBSForwardingInfo * ForwardingInfo)
// Far simpler to config it, but can users cope??
// Will config for testing. HA, N
/*
/*
TopElement=ForwardingInfo->HADDRS[Count][0];
if (strcmp(TopElement, MyElements[0]) == 0)
@ -692,16 +687,14 @@ VOID SetupHAddreses(struct BBSForwardingInfo * ForwardingInfo)
if (Elements < MyElementCount)
break;
FullHR:
*/
FullHR:
*/
ForwardingInfo->HADDROffet[Count] = (Num)? atoi(Num): 0;
if (ForwardingInfo->HADDRS[Count][1])
{
if (FOURCHARCONT == 0)
{
#ifdef TWOCHARCONT
if (strlen(ForwardingInfo->HADDRS[Count][1]) == 4)
{
// Convert to 2 char Continent;
@ -712,9 +705,7 @@ VOID SetupHAddreses(struct BBSForwardingInfo * ForwardingInfo)
ForwardingInfo->HADDRS[Count][1] = _strdup(Continent->TwoCharCode);
}
}
}
else
{
#else
if (strlen(ForwardingInfo->HADDRS[Count][1]) == 2)
{
// Convert to 4 char Continent;
@ -725,7 +716,8 @@ VOID SetupHAddreses(struct BBSForwardingInfo * ForwardingInfo)
ForwardingInfo->HADDRS[Count][1] = _strdup(Continent->FourCharCode);
}
}
}
#endif
}
free(SaveHText);
HText++;
@ -740,7 +732,7 @@ VOID SetupHAddresesP(struct BBSForwardingInfo * ForwardingInfo)
int Count=0;
char ** HText = ForwardingInfo->HaddressesP;
char * SaveHText, * ptr2;
// char * TopElement;
// char * TopElement;
char * Num;
struct Continent * Continent;
@ -789,9 +781,7 @@ VOID SetupHAddresesP(struct BBSForwardingInfo * ForwardingInfo)
if (ForwardingInfo->HADDRSP[Count][1])
{
if (FOURCHARCONT == 0)
{
#ifdef TWOCHARCONT
if (strlen(ForwardingInfo->HADDRSP[Count][1]) == 4)
{
// Convert to 2 char Continent;
@ -802,9 +792,7 @@ VOID SetupHAddresesP(struct BBSForwardingInfo * ForwardingInfo)
ForwardingInfo->HADDRSP[Count][1] = _strdup(Continent->TwoCharCode);
}
}
}
else
{
#else
if (strlen(ForwardingInfo->HADDRSP[Count][1]) == 2)
{
// Convert to 4 char Continent;
@ -815,7 +803,7 @@ VOID SetupHAddresesP(struct BBSForwardingInfo * ForwardingInfo)
ForwardingInfo->HADDRSP[Count][1] = _strdup(Continent->FourCharCode);
}
}
}
#endif
}
free(SaveHText);
HText++;
@ -1082,7 +1070,7 @@ int MatchMessagetoBBSList(struct MsgInfo * Msg, CIRCUIT * conn)
}
}
// See if sending @ winlink.org
// See if sending @ winlink.org
if (_stricmp(Msg->to, "RMS") == 0)
{
@ -1235,11 +1223,11 @@ int MatchMessagetoBBSList(struct MsgInfo * Msg, CIRCUIT * conn)
if (Country)
{
// Just need to add Continent and WW
if (FOURCHARCONT == 0)
#ifdef TWOCHARCONT
sprintf_s(FullRoute, sizeof(FullRoute),"%s.%s.WW", RouteElements, Country->Continent2);
else
#else
sprintf_s(FullRoute, sizeof(FullRoute),"%s.%s.WW", RouteElements, Country->Continent4);
#endif
goto FULLHA;
}
@ -1282,32 +1270,29 @@ FULLHA:
if (HElements[1])
{
if (FOURCHARCONT == 0)
{
#ifdef TWOCHARCONT
if (strlen(HElements[1]) == 4)
{
// Convert to 2 char Continent;
Continent = FindContinent(HElements[1]);
if (Continent)
{
// free(MyElements[1]);
// free(MyElements[1]);
HElements[1] = _strdup(Continent->TwoCharCode);
}
}
}
else
{
#else
if (strlen(HElements[1]) == 2)
{
// Convert to 4 char Continent;
Continent = FindContinent(HElements[1]);
if (Continent)
{
// free(MyElements[1]);
// free(MyElements[1]);
HElements[1] = _strdup(Continent->FourCharCode);
}
}
}
#endif
}
@ -1401,62 +1386,6 @@ NOHA:
goto CheckWildCardedAT;
}
// First check P message to multiple destinations
// We should choose the BBS with most matching elements (ie match on #23.GBR better that GBR)
// If SendPtoMultiple is set I think we send to any with same match level
// So if SendPtoMultiple is set I think I need to find the best depth then send to all with the same depth
// If none are found on HA match drop through.
if (SendPtoMultiple && Msg->type == 'P')
{
struct UserInfo * bestbbs = NULL;
int bestmatch = 0;
int depth;
int Matched = 0;
int MultiPDepth = 0;
Count = 0;
Logprintf(LOG_BBS, conn, '?', "SendPtoMultiple is set. Checking for best match level");
for (bbs = BBSChain; bbs; bbs = bbs->BBSNext)
{
ForwardingInfo = bbs->ForwardingInfo;
depth = CheckBBSHElements(Msg, bbs, ForwardingInfo, ATBBS, &HElements[0]);
if (depth)
{
if (depth > MultiPDepth)
{
MultiPDepth = depth;
bestbbs = bbs;
}
}
}
if (MultiPDepth)
{
for (bbs = BBSChain; bbs; bbs = bbs->BBSNext)
{
ForwardingInfo = bbs->ForwardingInfo;
depth = CheckBBSHElements(Msg, bbs, ForwardingInfo, ATBBS, &HElements[0]);
if (depth == MultiPDepth)
{
Logprintf(LOG_BBS, conn, '?', "Routing Trace HR Matches BBS %s Depth %d", bbs->Call, depth);
CheckAndSend(Msg, conn, bbs);
Count++;
}
}
return Count;
}
else
Logprintf(LOG_BBS, conn, '?', "SendPtoMultiple is set but no match on HA");
}
if (Msg->type == 'P' || Flood == 0)
{
@ -1538,7 +1467,50 @@ NOHA:
return 1;
}
// Normal HA match (not SendPToMultiple)
// We should choose the BBS with most matching elements (ie match on #23.GBR better that GBR)
// If SendPtoMultiple is set I think we send to any with same match level
// So if SendPtoMultiple is set I think I need to find the best depth then send to all with the same depth
if (SendPtoMultiple && Msg->type == 'P')
{
Logprintf(LOG_BBS, conn, '?', "SendPtoMultiple is set. Checking for best match level");
for (bbs = BBSChain; bbs; bbs = bbs->BBSNext)
{
ForwardingInfo = bbs->ForwardingInfo;
depth = CheckBBSHElements(Msg, bbs, ForwardingInfo, ATBBS, &HElements[0]);
if (depth)
{
if (depth > MultiPDepth)
{
MultiPDepth = depth;
bestbbs = bbs;
}
}
if (MultiPDepth)
{
for (bbs = BBSChain; bbs; bbs = bbs->BBSNext)
{
ForwardingInfo = bbs->ForwardingInfo;
depth = CheckBBSHElements(Msg, bbs, ForwardingInfo, ATBBS, &HElements[0]);
if (depth == MultiPDepth)
{
Logprintf(LOG_BBS, conn, '?', "Routing Trace HR Matches BBS %s Depth %d", bbs->Call, depth);
CheckAndSend(Msg, conn, bbs);
}
}
return 1;
}
}
}
for (bbs = BBSChain; bbs; bbs = bbs->BBSNext)
{
@ -1672,10 +1644,10 @@ CheckWildCardedAT:
Logprintf(LOG_BBS, conn, '?', "Routing Trace - No Match");
return Count;
}
}
BOOL CheckBBSToList(struct MsgInfo * Msg, struct UserInfo * bbs, struct BBSForwardingInfo * ForwardingInfo)
{
BOOL CheckBBSToList(struct MsgInfo * Msg, struct UserInfo * bbs, struct BBSForwardingInfo * ForwardingInfo)
{
char ** Calls;
// Check TO distributions
@ -1693,10 +1665,10 @@ BOOL CheckBBSToList(struct MsgInfo * Msg, struct UserInfo * bbs, struct BBSForwa
}
}
return FALSE;
}
}
BOOL CheckBBSAtList(struct MsgInfo * Msg, struct BBSForwardingInfo * ForwardingInfo, char * ATBBS)
{
BOOL CheckBBSAtList(struct MsgInfo * Msg, struct BBSForwardingInfo * ForwardingInfo, char * ATBBS)
{
char ** Calls;
// Check AT distributions
@ -1717,10 +1689,10 @@ BOOL CheckBBSAtList(struct MsgInfo * Msg, struct BBSForwardingInfo * ForwardingI
}
}
return FALSE;
}
}
int CheckBBSHElements(struct MsgInfo * Msg, struct UserInfo * bbs, struct BBSForwardingInfo * ForwardingInfo, char * ATBBS, char ** HElements)
{
int CheckBBSHElements(struct MsgInfo * Msg, struct UserInfo * bbs, struct BBSForwardingInfo * ForwardingInfo, char * ATBBS, char ** HElements)
{
// Used for Personal Messages, and Bulls not yot at their target area
char *** HRoutes;
@ -1757,11 +1729,11 @@ int CheckBBSHElements(struct MsgInfo * Msg, struct UserInfo * bbs, struct BBSFor
}
}
return bestmatch;
}
}
int CheckBBSHElementsFlood(struct MsgInfo * Msg, struct UserInfo * bbs, struct BBSForwardingInfo * ForwardingInfo, char * ATBBS, char ** HElements)
{
int CheckBBSHElementsFlood(struct MsgInfo * Msg, struct UserInfo * bbs, struct BBSForwardingInfo * ForwardingInfo, char * ATBBS, char ** HElements)
{
char *** HRoutes;
char ** BBSHA;

View File

@ -196,9 +196,6 @@ KC6OAR*>ID:
Port = msg->PORT;
if (Port == 40)
Port = Port;
if (Port & 0x80)
{
if ((MTX & 1) == 0)
@ -253,9 +250,11 @@ KC6OAR*>ID:
ptr += 7;
n--;
if (n < 0)
if (n == 0)
{
return 0; // Corrupt - no end of address bit
}
}
// Reached End of digis

4322
SCSPactor.c.bak Normal file

File diff suppressed because it is too large Load Diff

View File

@ -452,7 +452,8 @@ ok:
if (buffptr == 0) return (0); // No buffers, so ignore
buffptr->Len = sprintf(&buffptr->Data[0], "No Connection to TNC\r");
buffptr->Len = 36;
memcpy(&buffptr->Data[0], "No Connection to TNC\r", 36);
C_Q_ADD(&TNC->Streams[Stream].PACTORtoBPQ_Q, buffptr);

View File

@ -427,7 +427,6 @@ int ProcessLine(char * buf, int Port)
TCP->MaxSessions = 10; // Default Values
TNC->Hardware = H_TELNET;
TCP->IPV4 = TRUE;
TCP->SecureTelnet = 1;
strcpy(TCP->CMSServer, "cms.winlink.org");
}

2
VARA.c
View File

@ -2586,7 +2586,7 @@ VOID VARAProcessDataPacket(struct TNCINFO * TNC, UCHAR * Data, int Length)
STREAM->BytesRXed += Length;
Data[Length] = 0;
// Debugprintf("VARA: RXD %d bytes", Length);
Debugprintf("VARA: RXD %d bytes", Length);
sprintf(TNC->WEB_TRAFFIC, "Sent %d RXed %d Queued %d",
STREAM->BytesTXed, STREAM->BytesRXed,STREAM->BytesOutstanding);

View File

@ -10,14 +10,14 @@
#endif
#define KVers 6,0,24,42
#define KVerstring "6.0.24.42\0"
#define KVers 6,0,24,38
#define KVerstring "6.0.24.38\0"
#ifdef CKernel
#define Vers KVers
#define Verstring KVerstring
#define Datestring "August 2024"
#define Datestring "January 2024"
#define VerComments "G8BPQ Packet Switch (C Version)" KVerstring
#define VerCopyright "Copyright © 2001-2024 John Wiseman G8BPQ\0"
#define VerDesc "BPQ32 Switch\0"

View File

@ -70,9 +70,8 @@
// Allow /History to be shortened to /Hi (45)
// Fix extra r charater in Chat Config Web Page
//.25
// Increase size of status display buffers (7)
// Increase sise of status display buffers (7)
#include "BPQChat.h"
#include "Dbghelp.h"

View File

@ -43,7 +43,7 @@
#define NEWROUTING
extern int FOURCHARCONT;
// Standard __except handler for try/except
@ -1194,7 +1194,8 @@ int CountMessagestoForward(struct UserInfo * user);
VOID * GetMultiLineDialogParam(HWND hDialog, int DLGItem);
#define LIBCONFIG_STATIC
#include "libconfig.h"
VOID * GetMultiStringValue(config_setting_t * hKey, char * ValueName);
VOID * RegGetMultiStringValue(HKEY hKey, char * ValueName);

1
debian/bpq32.cfg vendored
View File

@ -34,7 +34,6 @@ PORT
LOGGING=1
CMS=1
DisconnectOnClose=1
SECURETELNET=1
TCPPORT=8010
FBBPORT=8011
HTTPPORT=8008

22
debian/changelog vendored
View File

@ -1,25 +1,3 @@
linbpq (6.0.24.42-1~bpo11+1) bullseye; urgency=medium
* Rebuild for bullseye.
-- Dave Hibberd <hibby@debian.org> Wed, 25 Sep 2024 01:41:01 +0100
linbpq (6.0.24.42-1) unstable; urgency=medium
* Install config to /etc
* New upstream update
* Add in new repo for continued updates
-- Dave Hibberd <hibby@debian.org> Wed, 25 Sep 2024 01:36:59 +0100
linbpq (6.0.24.40-1) unstable; urgency=medium
* Fresh upstream release
- Patches refreshed
* Secure by default patch
-- Dave Hibberd <hibby@debian.org> Sun, 07 Jul 2024 16:09:28 +0100
linbpq (6.0.24.38-1~bpo11+1) bullseye; urgency=medium
* Rebuild for bullseye.

2
debian/control vendored
View File

@ -11,7 +11,7 @@ Rules-Requires-Root: no
Package: linbpq
Architecture: linux-any
Depends: ${shlibs:Depends}, ${misc:Depends}, adduser, hibbian-archive-keyring
Depends: ${shlibs:Depends}, ${misc:Depends}, adduser
Description: Packet node and ax25 stack
LINBPQ is a Linux version of the BPQ32 Node, BBS and Chat Server components.
It is actively developed by John G8BPQ and contains a complete, independent

1
debian/install vendored
View File

@ -1 +0,0 @@
debian/bpq32.cfg etc/

View File

@ -1,66 +0,0 @@
--- a/Multicast.c
+++ b/Multicast.c
@@ -620,7 +620,7 @@
int r;
UINT rlen;
- UINT outlen;
+ size_t outlen;
memcpy(&rlen, &Decoded[5], 4);
--- a/MBLRoutines.c
+++ b/MBLRoutines.c
@@ -23,7 +23,7 @@
#include "bpqmail.h"
-void SendMessageReadEvent(struct UserInfo * user, struct MsgInfo * Msg);
+void SendMessageReadEvent(char * Call, struct MsgInfo * Msg);
VOID ProcessMBLLine(CIRCUIT * conn, struct UserInfo * user, UCHAR* Buffer, int len)
--- a/bpqmail.h
+++ b/bpqmail.h
@@ -695,8 +695,8 @@
unsigned char Type;
unsigned char changed;
unsigned short seen;
- long long last_modif;
- long long last_seen;
+ time_t last_modif;
+ time_t last_seen;
char first_homebbs[41];
char secnd_homebbs[41];
char first_zip[9];
--- a/AGWAPI.c
+++ b/AGWAPI.c
@@ -128,7 +128,7 @@
int AGWGetSessionKey(char * key, struct AGWSocketConnectionInfo * sockptr);
int ProcessAGWCommand(struct AGWSocketConnectionInfo * sockptr);
int SendDataToAppl(int Stream, byte * Buffer, int Length);
-int InternalAGWDecodeFrame(char * msg, char * buffer, int Stamp, int * FrameType, int useLocalTime, int doNodes);
+int InternalAGWDecodeFrame(char * msg, char * buffer, time_t Stamp, int * FrameType, int useLocalTime, int doNodes);
int AGWDataSocket_Disconnect( struct AGWSocketConnectionInfo * sockptr);
int SendRawPacket(struct AGWSocketConnectionInfo * sockptr, char *txmsg, int Length);
int ShowApps();
--- a/AGWMoncode.c
+++ b/AGWMoncode.c
@@ -68,7 +68,7 @@
static UCHAR * DISPLAYARPDATAGRAM(UCHAR * Datagram, UCHAR * Output);
-int InternalAGWDecodeFrame(MESSAGE * msg, char * buffer, int Stamp, int * FrameType, int useLocalTime, int DoNodes)
+int InternalAGWDecodeFrame(MESSAGE * msg, char * buffer, time_t Stamp, int * FrameType, int useLocalTime, int DoNodes)
{
UCHAR * ptr;
int n;
@@ -364,7 +364,7 @@
}
if (Output == NULL)
- return NULL;
+ return 0;
if (Output[-1] != 13)
Output += sprintf((char *)Output, "\r");

View File

@ -1,258 +0,0 @@
--- /dev/null
+++ b/bpqheaders.h
@@ -0,0 +1,8 @@
+//Header for an easier build under debian GCC-14
+#include <stdio.h>
+#include <time.h>
+#include <fcntl.h>
+
+int CanPortDigi(int Port);
+
+int KissEncode(unsigned char * inbuff, unsigned char * outbuff, int len);
--- a/cMain.c
+++ b/cMain.c
@@ -29,9 +29,10 @@
//#include "windows.h"
//#include "winerror.h"
-#include "time.h"
-#include "stdio.h"
+#include <time.h>
+#include <stdio.h>
#include <fcntl.h>
+#include "bpqheaders.h"
#include "kernelresource.h"
#include "CHeaders.h"
--- a/CHeaders.h
+++ b/CHeaders.h
@@ -93,7 +93,7 @@
char * MOVEANDCHECK(TRANSPORTENTRY * Session, char * Bufferptr, char * Source, int Len);
VOID DISPLAYCIRCUIT(TRANSPORTENTRY * L4, char * Buffer);
char * FormatUptime(int Uptime);
-char * strlop(char * buf, char delim);
+char * strlop(const char * buf, char delim);
BOOL CompareCalls(UCHAR * c1, UCHAR * c2);
VOID PostDataAvailable(TRANSPORTENTRY * Session);
@@ -427,4 +427,4 @@
extern int MinCounter[MaxBPQPortNo + 1]; // Interval Countdown
extern BOOL SendFromFile[MaxBPQPortNo + 1];
-DllExport uint64_t APIENTRY GetPortFrequency(int PortNo, char * FreqStringMhz);
\ No newline at end of file
+DllExport uint64_t APIENTRY GetPortFrequency(int PortNo, char * FreqStringMhz);
--- a/WinRPR.c
+++ b/WinRPR.c
@@ -63,7 +63,6 @@
static RECT Rect;
VOID __cdecl Debugprintf(const char * format, ...);
-char * strlop(char * buf, char delim);
char NodeCall[11]; // Nodecall, Null Terminated
--- a/bpqmail.h
+++ b/bpqmail.h
@@ -877,7 +877,6 @@
};
VOID __cdecl nprintf(CIRCUIT * conn, const char * format, ...);
-char * strlop(char * buf, char delim);
int rt_cmd(CIRCUIT *circuit, char * Buffer);
CIRCUIT *circuit_new(CIRCUIT *circuit, int flags);
VOID BBSputs(CIRCUIT * conn, char * buf);
--- a/APRSCode.c
+++ b/APRSCode.c
@@ -63,7 +63,6 @@
VOID __cdecl Consoleprintf(const char * format, ...);
BOOL APIENTRY Send_AX(PMESSAGE Block, DWORD Len, UCHAR Port);
VOID Send_AX_Datagram(PDIGIMESSAGE Block, DWORD Len, UCHAR Port);
-char * strlop(char * buf, char delim);
int APRSDecodeFrame(char * msg, char * buffer, time_t Stamp, uint64_t Mask); // Unsemaphored DecodeFrame
APRSHEARDRECORD * UpdateHeard(UCHAR * Call, int Port);
BOOL CheckforDups(char * Call, char * Msg, int Len);
--- a/FLDigi.c
+++ b/FLDigi.c
@@ -101,8 +101,6 @@
VOID ReleaseOtherPorts(struct TNCINFO * ThisTNC);
VOID WritetoTrace(struct TNCINFO * TNC, char * Msg, int Len);
-char * strlop(char * buf, char delim);
-
extern UCHAR BPQDirectory[];
#define MAXMPSKPORTS 16
--- a/MULTIPSK.c
+++ b/MULTIPSK.c
@@ -71,8 +71,6 @@
static VOID DoMonitorHddr(struct TNCINFO * TNC, struct AGWHEADER * RXHeader, UCHAR * Msg);
VOID SendRPBeacon(struct TNCINFO * TNC);
-char * strlop(char * buf, char delim);
-
extern UCHAR BPQDirectory[];
#define MAXMPSKPORTS 16
--- a/AGWMoncode.c
+++ b/AGWMoncode.c
@@ -61,7 +61,6 @@
#define NODES_SIG 0xFF
-char * strlop(char * buf, char delim);
UCHAR * DisplayINP3RIF(UCHAR * ptr1, UCHAR * ptr2, int msglen);
static UCHAR * DISPLAY_NETROM(MESSAGE * ADJBUFFER, UCHAR * Output, int MsgLen, int DoNodes);
--- a/Bpq32.c
+++ b/Bpq32.c
@@ -1406,7 +1406,6 @@
VOID FindLostBuffers();
BOOL InitializeTNCEmulator();
VOID TNCTimer();
-char * strlop(char * buf, char delim);
DllExport int APIENTRY Get_APPLMASK(int Stream);
DllExport int APIENTRY GetStreamPID(int Stream);
--- a/CMSAuth.c
+++ b/CMSAuth.c
@@ -31,7 +31,7 @@
#include <windows.h>
#endif
-char * strlop(char * buf, char delim);
+char * strlop(const char * buf, char delim);
VOID APIENTRY md5 (char *arg, unsigned char * checksum);
--- a/FLDigi64.c
+++ b/FLDigi64.c
@@ -102,8 +102,6 @@
VOID SuspendOtherPorts(struct TNCINFO * ThisTNC);
VOID ReleaseOtherPorts(struct TNCINFO * ThisTNC);
-char * strlop(char * buf, char delim);
-
extern UCHAR BPQDirectory[];
#define MAXBPQPORTS 32
--- a/HTTPcode.c
+++ b/HTTPcode.c
@@ -102,7 +102,6 @@
extern UCHAR ConfigDirectory[260];
-char * strlop(char * buf, char delim);
VOID sendandcheck(SOCKET sock, const char * Buffer, int Len);
int CompareNode(const void *a, const void *b);
int CompareAlias(const void *a, const void *b);
--- a/MULTIPSK64.c
+++ b/MULTIPSK64.c
@@ -74,8 +74,6 @@
static VOID DoMonitorHddr(struct TNCINFO * TNC, struct AGWHEADER * RXHeader, UCHAR * Msg);
VOID SendRPBeacon(struct TNCINFO * TNC);
-char * strlop(char * buf, char delim);
-
extern UCHAR BPQDirectory[];
#define MAXBPQPORTS 32
--- a/Moncode.c
+++ b/Moncode.c
@@ -59,7 +59,6 @@
#define NODES_SIG 0xFF
-char * strlop(char * buf, char delim);
UCHAR * DisplayINP3RIF(UCHAR * ptr1, UCHAR * ptr2, unsigned int msglen);
char * DISPLAY_NETROM(MESSAGE * ADJBUFFER, UCHAR * Output, int MsgLen);
--- a/NodeMapTest.c
+++ b/NodeMapTest.c
@@ -201,7 +201,6 @@
int ConvFromAX25(unsigned char * incall, char * outcall);
void GenerateOutputFiles(time_t Now);
void UpdateHeardData(struct NodeData * Node, struct NodeData * Call, char * Freq, char * LOC, char * Flags);
-char * strlop(char * buf, char delim);
void ProcessChatUpdate(char * From, char * Msg);
void ProcessNodeUpdate(char * From, char * Msg);
--- a/SCSTracker.c
+++ b/SCSTracker.c
@@ -52,7 +52,6 @@
static RECT Rect;
VOID __cdecl Debugprintf(const char * format, ...);
-char * strlop(char * buf, char delim);
char NodeCall[11]; // Nodecall, Null Terminated
--- a/TelnetV6.c
+++ b/TelnetV6.c
@@ -127,8 +127,6 @@
static int ProcessLine(char * buf, int Port);
VOID __cdecl Debugprintf(const char * format, ...);
-char * strlop(char * buf, char delim);
-
int DisplaySessions(struct TNCINFO * TNC);
int DoStateChange(int Stream);
--- a/UIARQ.c
+++ b/UIARQ.c
@@ -78,7 +78,6 @@
VOID Send_AX_Datagram(PDIGIMESSAGE Block, DWORD Len, UCHAR Port);
int DoScanLine(struct TNCINFO * TNC, char * Buff, int Len);
VOID ProcessARQPacket(struct PORTCONTROL * PORT, MESSAGE * Buffer);
-char * strlop(char * buf, char delim);
extern UCHAR BPQDirectory[];
extern char MYALIASLOPPED[10];
--- a/bpqchat.h
+++ b/bpqchat.h
@@ -603,7 +603,6 @@
VOID nputs(ChatCIRCUIT * conn, char * buf);
#endif
BOOL matchi(char * p1, char * p2);
-char * strlop(char * buf, char delim);
int rt_cmd(ChatCIRCUIT *circuit, char * Buffer);
ChatCIRCUIT *circuit_new(ChatCIRCUIT *circuit, int flags);
void makelinks(void);
@@ -775,4 +774,4 @@
struct ConsoleInfo * ConsHeader[2];
-extern BOOL LogCHAT;
\ No newline at end of file
+extern BOOL LogCHAT;
--- a/SCSTrackeMulti.c
+++ b/SCSTrackeMulti.c
@@ -48,7 +48,6 @@
static RECT Rect;
VOID __cdecl Debugprintf(const char * format, ...);
-char * strlop(char * buf, char delim);
BOOL KAMStartPort(struct PORTCONTROL * PORT);
BOOL KAMStopPort(struct PORTCONTROL * PORT);
--- a/SCSTrackeMulti64.c
+++ b/SCSTrackeMulti64.c
@@ -52,7 +52,6 @@
struct TNCINFO * TNCInfo[34]; // Records are Malloc'd
VOID __cdecl Debugprintf(const char * format, ...);
-char * strlop(char * buf, char delim);
BOOL KAMStartPort(struct PORTCONTROL * PORT);
BOOL KAMStopPort(struct PORTCONTROL * PORT);
--- a/CommonCode.c
+++ b/CommonCode.c
@@ -568,7 +568,7 @@
return ptr;
}
-char * strlop(char * buf, char delim)
+char * strlop(const char * buf, char delim)
{
// Terminate buf at delim, and return rest of string

View File

@ -1,10 +0,0 @@
--- a/TelnetV6.c
+++ b/TelnetV6.c
@@ -429,6 +429,7 @@
TCP->IPV4 = TRUE;
TCP->SecureTelnet = 1;
strcpy(TCP->CMSServer, "cms.winlink.org");
+ TCP->SecureTelnet = 1;
}
TNC = TNCInfo[Port];

View File

@ -1,5 +1,2 @@
headers.patch
ftbfs-gcc14.patch
spelling-errors.patch
makefile
secure-by-default.patch

View File

@ -22,7 +22,7 @@
--- a/BPQMail.rc
+++ b/BPQMail.rc
@@ -1045,7 +1045,7 @@
@@ -1042,7 +1042,7 @@
CONTROL "Delete Log and Message Files to Recycle Bin",
IDC_DELETETORECYCLE,"Button",BS_AUTOCHECKBOX |
BS_LEFTTEXT | BS_MULTILINE | WS_TABSTOP,5,142,115,20
@ -108,7 +108,7 @@
goto SeeifMore; // SEE IF ANYTHING ELSE
--- a/templatedefs.c
+++ b/templatedefs.c
@@ -1165,7 +1165,7 @@
@@ -1158,7 +1158,7 @@
"Send Non-delivery Notifications<br>\r\n"
"for P and T messages <input %sname=\"SendND\" value=\"SendND\" type=\"checkbox\" /><br>\r\n"
" <br />\r\n"
@ -117,7 +117,7 @@
"Housekeeping Result <input %sname=\"NoMail\" value=\"Yes\" type=\"checkbox\"><br><br>\r\n"
"Generate Traffic Report<input %sname=\"GenTraffic\" value=\"Yes\" type=\"checkbox\"><br><br>\r\n"
"<div style=\"text-align: center;\"><input class='btn' name=RunNow value=\"Run Housekeeping\" type=submit class='btn'></div>\r\n"
@@ -1454,7 +1454,7 @@
@@ -1446,7 +1446,7 @@
"<div style=\"text-align: left; width: 680px; margin: auto;\">The Nodes to link to box defines which other Chat Nodes should be connected to, or from which "
"connections may be accepted. The format is ALIAS:CALL, eg BPQCHT:G8BPQ-4. If the node is not directly "
"connectable (ie is not in your NODES table) you can add a connect script. This consists of a series of commands "

2
debian/rules vendored
View File

@ -1,6 +1,6 @@
#!/usr/bin/make -f
export DEB_BUILD_MAINT_OPTIONS=hardening=+all
#export DEB_BUILD_MAINT_OPTIONS=hardening=+all
CFLAGS = $(shell dpkg-buildflags --get CFLAGS)
CFLAGS += -fcommon

View File

@ -101,7 +101,7 @@ char * FwdPagetxt()
"{"
"position: absolute;"
"width:290px;"
"height:550px;"
"height:510px;"
"border:0px solid;"
"overflow: auto;"
"}"
@ -109,7 +109,7 @@ char * FwdPagetxt()
"{"
"position: absolute;"
"width:180px;"
"height:540px;"
"height:500px;"
"border:2px solid;"
"overflow: auto;"
"}"
@ -118,7 +118,7 @@ char * FwdPagetxt()
"position: absolute;"
"width:95px;"
"left:190px;"
"height:540px;"
"height:500px;"
"border:2px solid;"
"overflow: auto;"
"}"
@ -255,7 +255,6 @@ char * FwdPagetxt()
" <td><a href=\"/Mail/Wel?%s\">Welcome Msgs &amp; Prompts</a></td>"
" <td><a href=\"/Mail/HK?%s\">Housekeeping</a></td>"
" <td><a href=\"/Mail/WP?%s\">WP Update</a></td>"
"<td><a href=/Webmail>WebMail</a></td>"
" <td><a href=\"/\">Node Menu</a></td>"
" </tr>"
" </tbody>"
@ -280,8 +279,7 @@ char * FwdPagetxt()
" <br />"
"Send P Msgs to more than one BBS&nbsp;<input %sname=SendPtoMultiple type=checkbox /><br />"
" <br />"
"Use 4 Char Continent Codes&nbsp;<input %sname=FourCharCont type=checkbox /><br />"
" <br />"
"Aliases<br />"
" <br />"
" <textarea rows=8 cols=12 name=Aliases>%s</textarea><br><br>"
@ -402,7 +400,6 @@ char * WebMailPagetxt()
"<td><a href=/WebMail/WMAuto?%s>Auto Refresh</a></td>\r\n"
"<td><a href=\"#\" onclick=\"newmsg('%s'); return false;\">Send Message</a></td>\r\n"
"<td><a href=/WebMail/WMLogout?%s>Logout</a></td>\r\n"
"<td><a href=/Mail/Header>Mail Mgmt</a></td>\r\n"
"<td><a href=/>Node Menu</a></td></tr></table>\r\n"
"<br>\r\n"
"<div align=left id=\"main\" style=\"overflow:scroll;\">\r\n"
@ -455,7 +452,6 @@ char * MainConfigtxt()
" <td><a href=\"/Mail/Wel?%s\">Welcome Msgs &amp; Prompts</a></td>\r\n"
" <td><a href=\"/Mail/HK?%s\">Housekeeping</a></td>\r\n"
" <td><a href=\"/Mail/WP?%s\">WP Update</a></td>\r\n"
"<td><a href=/Webmail>WebMail</a></td>"
" <td><a href=\"/\">Node Menu</a></td>\r\n"
"</tr></table>\r\n"
"<br>\r\n"
@ -705,7 +701,6 @@ char * MsgPagetxt()
" <td><a href=\"/Mail/Wel?%s\">Welcome Msgs &amp; Prompts</a></td>\r\n"
" <td><a href=\"/Mail/HK?%s\">Housekeeping</a></td>\r\n"
" <td><a href=\"/Mail/WP?%s\">WP Update</a></td>\r\n"
"<td><a href=/Webmail>WebMail</a></td>"
" <td><a href=\"/\">Node Menu</a></td>\r\n"
" </tr>\r\n"
" </tbody>\r\n"
@ -1065,7 +1060,6 @@ char * UserPagetxt()
"<td><a href=/Mail/Wel?%s>Welcome Msgs & Prompts</a></td>\r\n"
"<td><a href=/Mail/HK?%s>Housekeeping</a></td>\r\n"
"<td><a href=/Mail/WP?%s>WP Update</a></td>\r\n"
"<td><a href=/Webmail>WebMail</a></td>"
"<td><a href=/>Node Menu</a></td></tr></table>\r\n"
"<br>\r\n"
"<div id=\"outer\">\r\n"
@ -1122,7 +1116,6 @@ char * Housekeepingtxt()
"<td><a href=/Mail/Wel?%s>Welcome Msgs & Prompts</a></td>\r\n"
"<td><a href=/Mail/HK?%s>Housekeeping</a></td>\r\n"
"<td><a href=/Mail/WP?%s>WP Update</a></td>\r\n"
"<td><a href=/Webmail>WebMail</a></td>"
"<td><a href=/>Node Menu</a></td></tr></table>\r\n"
"<br>\r\n"
"<div style=\"text-align: center;\"><font size=\"+1\"><span style=\"font-family: monospace; font-weight: bold;\">Housekeeping</span></font></div>\r\n"
@ -1371,7 +1364,6 @@ char * WPtxt()
" <td><a href=\"/Mail/Wel?%s\">Welcome Msgs &amp; Prompts</a></td>\r\n"
" <td><a href=\"/Mail/HK?%s\">Housekeeping</a></td>\r\n"
" <td><a href=\"/Mail/WP?%s\">WP Update</a></td>\r\n"
"<td><a href=/Webmail>WebMail</a></td>"
" <td><a href=\"/\">Node Menu</a></td>\r\n"
" </tr>\r\n"
" </tbody>\r\n"

View File

@ -225,8 +225,6 @@ struct STREAMINFO
char AGWKey[21]; // Session Key for AGW Session Based Drivers
time_t ConnectTime; // Time connection made
time_t AttachTime;
int BytesTXed;
int BytesAcked;
int BytesRXed;
@ -260,7 +258,6 @@ struct STREAMINFO
HWND xIDC_DIRN;
int RelaySyncStream;
int VaraACMode;
};
typedef struct AGWINFO
@ -412,7 +409,7 @@ struct FreeDataINFO
char * SSIDS[16];
};
struct sixPackInfo;
typedef struct TNCINFO
{
@ -430,9 +427,6 @@ typedef struct TNCINFO
time_t SessionTimeLimit; // Optional limit to total session time
time_t DefaultSessionTimeLimit; // Configured value
time_t AttachTimeLimit; // to trap port left attached for a long time without other activity
time_t AttachTime;
int Hardware; // Hardware Type
#define H_WINMOR 1
@ -455,7 +449,6 @@ typedef struct TNCINFO
#define H_WINRPR 17
#define H_HSMODEM 18
#define H_FREEDATA 19
#define H_SIXPACK 20
int Port; // BPQ Port Number
@ -846,8 +839,6 @@ typedef struct TNCINFO
char * NRNeighbour;
int NRCloseTimer;
struct _LINKTABLE * DummyLink; // Simulated link to simplify interface to ax,25 netrom code
struct sixPackPortInfo * sixPack;
int VaraACMode;
} *PTNCINFO;

9
upnp.c
View File

@ -85,7 +85,6 @@ char * leaseDuration = NULL;
struct UPNPDev * devlist = 0;
char lanaddr[64] = "unset"; /* my ip address on the LAN */
char wanaddr[64] = "unset"; /* my ip address on the LAN */
struct UPNPUrls urls;
struct IGDdatas data;
@ -127,11 +126,7 @@ int upnpInit()
return 0;
}
#if MINIUPNPC_API_VERSION == 18
i = UPNP_GetValidIGD(devlist, &urls, &data, lanaddr, sizeof(lanaddr), wanaddr, sizeof(wanaddr));
#else
i = UPNP_GetValidIGD(devlist, &urls, &data, lanaddr, sizeof(lanaddr));
#endif
}
AddMap(devlist->descURL, Config->LANport, Config->WANPort, Config->Protocol);
@ -158,11 +153,7 @@ int upnpClose()
return 0;
}
#if MINIUPNPC_API_VERSION == 18
i = UPNP_GetValidIGD(devlist, &urls, &data, lanaddr, sizeof(lanaddr), wanaddr, sizeof(wanaddr));
#else
i = UPNP_GetValidIGD(devlist, &urls, &data, lanaddr, sizeof(lanaddr));
#endif
}
DeleteMap(devlist->descURL, Config->LANport, Config->WANPort, Config->Protocol);