New upstream version 6.0.24.42

This commit is contained in:
Hibby 2024-08-30 10:14:56 +01:00
parent 766bbe358d
commit 6dfe32758e
34 changed files with 3429 additions and 4754 deletions

2129
6pack.c Normal file

File diff suppressed because it is too large Load Diff

12
ARDOP.c
View File

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

View File

@ -11762,300 +11762,258 @@ BOOL CheckforMIME(SocketConn * sockptr, char * Msg, char ** Body, int * MsgLen);
#include <sys/wait.h> #include <sys/wait.h>
#include <signal.h> #include <signal.h>
typedef struct _POPENRET // G8BPQ Version of Steve G7TAJ's code
{
FILE * fp;
pid_t pid;
} POPENRET;
/* int pgret = 9999;
* Check if the PG is still running after 5 sec int pindex = 0;
* if so, kill it
void sigchild_handler(int sig , siginfo_t * siginfo, void * ucontext)
{
/* • 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.
*/ */
void run_pgTimeoutThread( pid_t process ) // printf("SIGCHLD PID %d Code %d status %d\n", siginfo->si_pid, siginfo->si_code, siginfo->si_status);
{ pgret = siginfo->si_status;
// 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);
} }
//https://sources.debian.org/src/cron/3.0pl1-45/popen.c/ void run_pg(CIRCUIT * conn, struct UserInfo * user)
POPENRET my_popen(char *program, char *type, CIRCUIT *conn)
{ {
register char *cp; register char *cp;
FILE *iop; FILE *iop;
int argc, pdes[2]; int argc, pdes[2];
pid_t pid; pid_t pid;
POPENRET PRET;
if (*type != 'r' && *type != 'w' || type[1]) pgret = 9999;
return(PRET);
if (pipe(pdes) < 0) int index = user->Temp->PG_INDEX;
return(PRET);
iop = NULL; iop = NULL;
switch(pid = fork()) {
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())
{
case -1: /* error */ case -1: /* error */
(void)close(pdes[0]); (void)close(pdes[0]);
(void)close(pdes[1]); (void)close(pdes[1]);
return PRET; Debugprintf("run_pg fork failed");
BBSputs(conn, "Error running PG Server (fork() failed)\r");
conn->InputMode=0;
SendPrompt(conn, user);
return;
case 0: /* child */ case 0: /* child */
if (*type == 'r') {
if (pdes[1] != 1) { if (pdes[1] != 1)
{
dup2(pdes[1], 1); dup2(pdes[1], 1);
dup2(pdes[1], 2); dup2(pdes[1], 2);
(void)close(pdes[1]); (void)close(pdes[1]);
} }
(void)close(pdes[0]); (void)close(pdes[0]);
} else {
if (pdes[0] != 0) { setpgid(0, pid);
dup2(pdes[0], 0);
(void)close(pdes[0]); char *args[] = {"sh", "-c", buf, NULL};
}
(void)close(pdes[1]);
}
setpgid(-pid,pid);
char *args[] = {"sh", "-c", program, NULL};
execve("/bin/sh", args, NULL); execve("/bin/sh", args, NULL);
_exit(1); _exit(1);
} }
/* parent */ /* parent */
_beginthread((void (*)(void *))run_pgTimeoutThread, 0, (VOID *) pid ); // printf("child PID %d\n", pid);
if (*type == 'r') { struct timespec duration;
iop = fdopen(pdes[0], type); duration.tv_sec = 5;
(void)close(pdes[1]); duration.tv_nsec = 0;
} else {
iop = fdopen(pdes[1], type); nanosleep(&duration, &duration); // Will be interrupted by SIGCHLD
(void)close(pdes[0]);
// 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");
(void)close(pdes[1]);
char buffer[128]; char buffer[128];
while (fgets(buffer, sizeof(buffer), iop) != NULL) while (fgets(buffer, sizeof(buffer), iop) != NULL)
{ {
BBSputs(conn, buffer); BBSputs(conn, buffer);
buffer[0] = '\0'; buffer[0] = '\0';
} }
PRET.fp = iop;
PRET.pid= pid;
return(PRET); switch (pgret)
}
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)
{
/* remove ';' security reasons */
ptr = strchr(pgdir, ';');
if (ptr)
*ptr = '\0';
sprintf (dir, "cd %s ; ", pgdir);
}
else
*dir = '\0';
*arg = '\0';
if (data)
{
/* remove ';' security reasons */
ptr = strchr(data, ';');
if (ptr)
*ptr = '\0';
sprintf (arg, " %s ", data);
}
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;
}
strcpy( call, conn->UserPointer->Call);
// sprintf( log_file, "%s-%d.log", call, conn);
index = user->Temp->PG_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 -1: // ERROR or forced closed
case 0: index=0; // Goodbye/Exit case 0:
index=0; // Goodbye/Exit
conn->InputMode=0; conn->InputMode=0;
SendPrompt(conn, user); SendPrompt(conn, user);
break; break;
case 1: index++; // inc & keep in PG case 1:
index++; // inc & keep in PG
break; break;
case 2: index=0; // disconnect
case 2:
index=0; // disconnect
conn->InputMode=0; conn->InputMode=0;
Disconnect(conn->BPQStream); Disconnect(conn->BPQStream);
break; break;
case 3: Debugprintf("data->BBS & end");
break; case 3:
case 4: Debugprintf("data->BBS and inc %d", index++); Debugprintf("data->BBS & end");
break;
case 5: Debugprintf("call no inc %d", ret);
break; break;
case 4:
Debugprintf("data->BBS and inc %d", pindex++);
break;
case 5:
Debugprintf("call no inc %d", pgret);
break;
default:
BBSputs(conn, "PG unexexpected response\r");
user->Temp->PG_INDEX = 0;
conn->InputMode=0;
SendPrompt(conn, user);
return;
} }
user->Temp->PG_INDEX = index; user->Temp->PG_INDEX = index;
// printf("runpg return index = %d\n", index);
} }
/*---- G7TAJ END ----- */ /*---- G7TAJ END ----- */
#else #else
@ -12076,7 +12034,7 @@ void ReadFromPipe(void);
void run_pg( CIRCUIT * conn, struct UserInfo * user ) void run_pg( CIRCUIT * conn, struct UserInfo * user )
{ {
// Run PG program, rend anything from program's stdout to the user // Run PG program, read anything from program's stdout to the user
int retcode = -1; int retcode = -1;
SECURITY_ATTRIBUTES saAttr; SECURITY_ATTRIBUTES saAttr;
@ -12251,7 +12209,7 @@ void run_pg( CIRCUIT * conn, struct UserInfo * user )
case 4: case 4:
// Send Output to BBS - was down above // Send Output to BBS - was done above
break; break;
case 5: case 5:

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="NOTTSDESKTOP"
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="NOTTSDESKTOP"
RemoteCommand=""
HttpUrl=""
PDBPath=""
SQLDebugging=""
Environment=""
EnvironmentMerge="true"
DebuggerFlavor=""
MPIRunCommand=""
MPIRunArguments=""
MPIRunWorkingDirectory=""
ApplicationCommand=""
ApplicationArguments=""
ShimCommand=""
MPIAcceptMode=""
MPIAcceptFilter=""
/>
</Configuration>
</Configurations>
</VisualStudioUserFile>

View File

@ -1137,6 +1137,7 @@
// Improve "New User" frequency determination (39) // Improve "New User" frequency determination (39)
// Allow selection of 2 or 4 character country codes for forward processing (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) // Fix Send P to multiple BBS's when routing on HR (40)
// Rewrite PG server code on Lunux (41)
#include "bpqmail.h" #include "bpqmail.h"
#include "winstdint.h" #include "winstdint.h"

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="NOTTSDESKTOP"
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="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="$(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>

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="NOTTSDESKTOP"
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="NOTTSDESKTOP"
RemoteCommand=""
HttpUrl=""
PDBPath=""
SQLDebugging=""
Environment=""
EnvironmentMerge="true"
DebuggerFlavor=""
MPIRunCommand=""
MPIRunArguments=""
MPIRunWorkingDirectory=""
ApplicationCommand=""
ApplicationArguments=""
ShimCommand=""
MPIAcceptMode=""
MPIAcceptFilter=""
/>
</Configuration>
</Configurations>
</VisualStudioUserFile>

View File

@ -1219,6 +1219,9 @@ along with LinBPQ/BPQ32. If not, see http://www.gnu.org/licenses
// Fix ICF8101 Mode setting (37) // Fix ICF8101 Mode setting (37)
// Kill link if we are getting repeated RR(F) after timeout // 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) // (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)
@ -1313,6 +1316,7 @@ void * KISSHFExtInit(EXTPORTDATA * PortEntry);
void * WinRPRExtInit(EXTPORTDATA * PortEntry); void * WinRPRExtInit(EXTPORTDATA * PortEntry);
void * HSMODEMExtInit(EXTPORTDATA * PortEntry); void * HSMODEMExtInit(EXTPORTDATA * PortEntry);
void * FreeDataExtInit(EXTPORTDATA * PortEntry); void * FreeDataExtInit(EXTPORTDATA * PortEntry);
void * SIXPACKExtInit(EXTPORTDATA * PortEntry);
extern char * ConfigBuffer; // Config Area extern char * ConfigBuffer; // Config Area
VOID REMOVENODE(dest_list * DEST); VOID REMOVENODE(dest_list * DEST);
@ -3950,6 +3954,9 @@ VOID * InitializeExtDriver(PEXTPORTDATA PORTVEC)
if (strstr(Value, "FREEDATA")) if (strstr(Value, "FREEDATA"))
return FreeDataExtInit; return FreeDataExtInit;
if (strstr(Value, "6PACK"))
return SIXPACKExtInit;
ExtDriver = LoadLibrary(Value); ExtDriver = LoadLibrary(Value);
if (ExtDriver == NULL) if (ExtDriver == NULL)

View File

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

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

View File

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

View File

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

View File

@ -1229,10 +1229,7 @@ int main(int argc, char * argv[])
strcpy(pgm, "LINBPQ"); strcpy(pgm, "LINBPQ");
Debugprintf("POP3 Debug Before Init TCP Timer = %d", POP3Timer);
InitialiseTCP(); InitialiseTCP();
Debugprintf("POP3 Debug Before Init NNTP Timer = %d", POP3Timer);
InitialiseNNTP(); InitialiseNNTP();
SetupListenSet(); // Master set of listening sockets SetupListenSet(); // Master set of listening sockets
@ -1286,8 +1283,6 @@ int main(int argc, char * argv[])
} }
} }
Debugprintf("POP3 Debug After Mail Init Timer = %d", POP3Timer);
if (NUMBEROFTNCPORTS) if (NUMBEROFTNCPORTS)
InitializeTNCEmulator(); InitializeTNCEmulator();

0
MHSave.txt Normal file
View 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="c:\linbpq"
CommandArguments=""
Attach="false"
DebuggerType="3"
Remote="1"
RemoteMachine="NOTTSDESKTOP"
RemoteCommand=""
HttpUrl=""
PDBPath=""
SQLDebugging=""
Environment=""
EnvironmentMerge="true"
DebuggerFlavor="0"
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="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="$(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>

View File

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

File diff suppressed because it is too large Load Diff

View File

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

View File

@ -427,6 +427,7 @@ int ProcessLine(char * buf, int Port)
TCP->MaxSessions = 10; // Default Values TCP->MaxSessions = 10; // Default Values
TNC->Hardware = H_TELNET; TNC->Hardware = H_TELNET;
TCP->IPV4 = TRUE; TCP->IPV4 = TRUE;
TCP->SecureTelnet = 1;
strcpy(TCP->CMSServer, "cms.winlink.org"); 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; STREAM->BytesRXed += Length;
Data[Length] = 0; 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", sprintf(TNC->WEB_TRAFFIC, "Sent %d RXed %d Queued %d",
STREAM->BytesTXed, STREAM->BytesRXed,STREAM->BytesOutstanding); STREAM->BytesTXed, STREAM->BytesRXed,STREAM->BytesOutstanding);

View File

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

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="NOTTSDESKTOP"
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="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="$(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="NOTTSDESKTOP"
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="NOTTSDESKTOP"
RemoteCommand=""
HttpUrl=""
PDBPath=""
SQLDebugging=""
Environment=""
EnvironmentMerge="true"
DebuggerFlavor=""
MPIRunCommand=""
MPIRunArguments=""
MPIRunWorkingDirectory=""
ApplicationCommand=""
ApplicationArguments=""
ShimCommand=""
MPIAcceptMode=""
MPIAcceptFilter=""
/>
</Configuration>
</Configurations>
</VisualStudioUserFile>

View File

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

View File

@ -1194,8 +1194,7 @@ int CountMessagestoForward(struct UserInfo * user);
VOID * GetMultiLineDialogParam(HWND hDialog, int DLGItem); VOID * GetMultiLineDialogParam(HWND hDialog, int DLGItem);
#define LIBCONFIG_STATIC
#include "libconfig.h"
VOID * GetMultiStringValue(config_setting_t * hKey, char * ValueName); VOID * GetMultiStringValue(config_setting_t * hKey, char * ValueName);
VOID * RegGetMultiStringValue(HKEY hKey, char * ValueName); VOID * RegGetMultiStringValue(HKEY hKey, char * ValueName);

View File

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

9
upnp.c
View File

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