Update upstream source from tag 'upstream/6.0.24.27'
Update to upstream version '6.0.24.27'
with Debian dir be0d74d7ed
This commit is contained in:
commit
0c8b9a1da7
|
@ -15,7 +15,7 @@
|
|||
Attach="false"
|
||||
DebuggerType="3"
|
||||
Remote="1"
|
||||
RemoteMachine="DESKTOP-TGEL8RC"
|
||||
RemoteMachine="NOTTSDESKTOP"
|
||||
RemoteCommand=""
|
||||
HttpUrl=""
|
||||
PDBPath=""
|
||||
|
@ -43,7 +43,7 @@
|
|||
Attach="false"
|
||||
DebuggerType="3"
|
||||
Remote="1"
|
||||
RemoteMachine="DESKTOP-TGEL8RC"
|
||||
RemoteMachine="NOTTSDESKTOP"
|
||||
RemoteCommand=""
|
||||
HttpUrl=""
|
||||
PDBPath=""
|
8
Bpq32.c
8
Bpq32.c
|
@ -1086,7 +1086,7 @@ along with LinBPQ/BPQ32. If not, see http://www.gnu.org/licenses
|
|||
// Add ? and * wildcards to NODES command (74)
|
||||
// Add Port RADIO config parameter (74)
|
||||
|
||||
// Version 6.0.24.1 August 2023
|
||||
// Version 6.0.24.1 August 2024
|
||||
|
||||
// Apply NODES command wildcard to alias as well a call (2)
|
||||
// Add STOPPORT/STARTPORT to VARA Driver (2)
|
||||
|
@ -1204,8 +1204,10 @@ along with LinBPQ/BPQ32. If not, see http://www.gnu.org/licenses
|
|||
// Fix some Rigcontrol issues with empty timebands (22)
|
||||
// Fix 64 bit bug in processing INP3 Messages (22)
|
||||
// First pass at api (24)
|
||||
// Send OK in response to Rigcontrol CMD (24);
|
||||
|
||||
// Send OK in response to Rigcontrol CMD (24)
|
||||
// Disable CTS check in WriteComBlock (26)
|
||||
// Improvments to reporting to M0LTE Map (26)
|
||||
// IPGateway fix from github user isavitsky (27)
|
||||
|
||||
#define CKernel
|
||||
|
||||
|
|
|
@ -1,65 +0,0 @@
|
|||
<?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="DESKTOP-TGEL8RC"
|
||||
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="DESKTOP-TGEL8RC"
|
||||
RemoteCommand=""
|
||||
HttpUrl=""
|
||||
PDBPath=""
|
||||
SQLDebugging=""
|
||||
Environment=""
|
||||
EnvironmentMerge="true"
|
||||
DebuggerFlavor=""
|
||||
MPIRunCommand=""
|
||||
MPIRunArguments=""
|
||||
MPIRunWorkingDirectory=""
|
||||
ApplicationCommand=""
|
||||
ApplicationArguments=""
|
||||
ShimCommand=""
|
||||
MPIAcceptMode=""
|
||||
MPIAcceptFilter=""
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
</VisualStudioUserFile>
|
|
@ -1,65 +0,0 @@
|
|||
<?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>
|
|
@ -1,65 +0,0 @@
|
|||
<?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>
|
|
@ -15,7 +15,7 @@
|
|||
Attach="false"
|
||||
DebuggerType="3"
|
||||
Remote="1"
|
||||
RemoteMachine="DESKTOP-TGEL8RC"
|
||||
RemoteMachine="NOTTSDESKTOP"
|
||||
RemoteCommand=""
|
||||
HttpUrl=""
|
||||
PDBPath=""
|
||||
|
@ -43,7 +43,7 @@
|
|||
Attach="false"
|
||||
DebuggerType="3"
|
||||
Remote="1"
|
||||
RemoteMachine="DESKTOP-TGEL8RC"
|
||||
RemoteMachine="NOTTSDESKTOP"
|
||||
RemoteCommand=""
|
||||
HttpUrl=""
|
||||
PDBPath=""
|
142
CommonCode.c
142
CommonCode.c
|
@ -917,8 +917,7 @@ BOOL ProcessIncommingConnectEx(struct TNCINFO * TNC, char * Call, int Stream, BO
|
|||
PMSGWITHLEN buffptr;
|
||||
int Totallen = 0;
|
||||
UCHAR * ptr;
|
||||
struct PORTCONTROL * PORT = TNC->PortRecord;
|
||||
|
||||
struct PORTCONTROL * PORT = (struct PORTCONTROL *)TNC->PortRecord;
|
||||
|
||||
// Stop Scanner
|
||||
|
||||
|
@ -2365,8 +2364,8 @@ BOOL WriteCOMBlock(HANDLE fd, char * Block, int BytesToWrite)
|
|||
|
||||
Err = GetCommModemStatus(fd, &Mask);
|
||||
|
||||
if ((Mask & MS_CTS_ON) == 0) // trap com0com other end not open
|
||||
return TRUE;
|
||||
// if ((Mask & MS_CTS_ON) == 0) // trap com0com other end not open
|
||||
// return TRUE;
|
||||
|
||||
fWriteStat = WriteFile(fd, Block, BytesToWrite,
|
||||
&BytesWritten, NULL );
|
||||
|
@ -3516,6 +3515,8 @@ int __sync_lock_test_and_set(int * ptr, int val)
|
|||
#endif // __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
|
||||
#endif // MACBPQ
|
||||
|
||||
|
||||
|
||||
void GetSemaphore(struct SEM * Semaphore, int ID)
|
||||
{
|
||||
//
|
||||
|
@ -3680,7 +3681,7 @@ VOID OpenReportingSockets()
|
|||
{
|
||||
// Enable Node Map Reports
|
||||
|
||||
ReportTimer = 600;
|
||||
ReportTimer = 60;
|
||||
|
||||
ReportSocket = socket(AF_INET,SOCK_DGRAM,0);
|
||||
|
||||
|
@ -4875,7 +4876,7 @@ static char HeaderTemplate[] = "POST %s HTTP/1.1\r\n"
|
|||
"Content-Type: application/json\r\n"
|
||||
"Host: %s:%d\r\n"
|
||||
"Content-Length: %d\r\n"
|
||||
//r\nUser-Agent: BPQ32(G8BPQ)\r\n"
|
||||
"User-Agent: %s%s\r\n"
|
||||
// "Expect: 100-continue\r\n"
|
||||
"\r\n";
|
||||
|
||||
|
@ -4889,7 +4890,11 @@ VOID SendWebRequest(SOCKET sock, char * Host, char * Request, char * Params, int
|
|||
char * ptr, * ptr1;
|
||||
int Sent;
|
||||
|
||||
sprintf(Header, HeaderTemplate, Request, Host, 80, Len, Params);
|
||||
#ifdef LINBPQ
|
||||
sprintf(Header, HeaderTemplate, Request, Host, 80, Len, "linbpq/", VersionString, Params);
|
||||
#else
|
||||
sprintf(Header, HeaderTemplate, Request, Host, 80, Len, "bpq32/", VersionString, Params);
|
||||
#endif
|
||||
Sent = send(sock, Header, (int)strlen(Header), 0);
|
||||
Sent = send(sock, Params, (int)strlen(Params), 0);
|
||||
|
||||
|
@ -4984,12 +4989,76 @@ VOID SendWebRequest(SOCKET sock, char * Host, char * Request, char * Params, int
|
|||
extern char MYALIASLOPPED[10];
|
||||
extern int MasterPort[MAXBPQPORTS+1];
|
||||
|
||||
|
||||
// G7TAJ //
|
||||
/*
|
||||
{"mheard": [
|
||||
{
|
||||
"Callsign": "GB7CIP-7",
|
||||
"Port": "VHF",
|
||||
"Packets": 70369,
|
||||
"LastHeard": "2024-12-29 20:26:32"
|
||||
},
|
||||
*/
|
||||
|
||||
void BuildPortMH(char * MHJSON, struct PORTCONTROL * PORT)
|
||||
{
|
||||
struct tm * TM;
|
||||
static char MHTIME[50];
|
||||
time_t szClock;
|
||||
MHSTRUC * MH = PORT->PORTMHEARD;
|
||||
int count = MHENTRIES;
|
||||
char Normcall[20];
|
||||
int len;
|
||||
char * ptr;
|
||||
char mhstr[400];
|
||||
|
||||
if (MH == NULL)
|
||||
return;
|
||||
|
||||
while (count--)
|
||||
{
|
||||
if (MH->MHCALL[0] == 0)
|
||||
break;
|
||||
|
||||
len = ConvFromAX25(MH->MHCALL, Normcall);
|
||||
Normcall[len] = 0;
|
||||
|
||||
ptr = &MH->MHCALL[6]; // End of Address bit
|
||||
|
||||
if ((*ptr & 1) == 0)
|
||||
{
|
||||
// at least one digi - which we are not going to include
|
||||
MH++;
|
||||
continue;
|
||||
}
|
||||
|
||||
Normcall[len++] = 0;
|
||||
|
||||
//format TIME
|
||||
|
||||
szClock = MH->MHTIME;
|
||||
TM = gmtime(&szClock);
|
||||
sprintf(MHTIME, "%d-%d-%d %02d:%02d:%02d",
|
||||
TM->tm_year+1900, TM->tm_mon + 1, TM->tm_mday, TM->tm_hour, TM->tm_min, TM->tm_sec);
|
||||
|
||||
sprintf(mhstr, "{\"callSign\": \"%s\", \"port\": \"%d\", \"packets\": %d, \"lastHeard\": \"%s\" },\r\n" ,
|
||||
Normcall, PORT->PORTNUMBER, MH->MHCOUNT, MHTIME);
|
||||
|
||||
strcat( MHJSON, mhstr );
|
||||
|
||||
MH++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void SendDataToPktMap(char *Msg)
|
||||
{
|
||||
SOCKET sock;
|
||||
char Return[256];
|
||||
char Request[64];
|
||||
char Params[50000];
|
||||
|
||||
struct PORTCONTROL * PORT = PORTTABLE;
|
||||
struct PORTCONTROL * SAVEPORT;
|
||||
struct ROUTE * Routes = NEIGHBOURS;
|
||||
|
@ -5010,10 +5079,19 @@ void SendDataToPktMap(char *Msg)
|
|||
int Port = 0;
|
||||
char Normcall[10];
|
||||
char Copy[20];
|
||||
char ID[33];
|
||||
|
||||
char * ptr = Params;
|
||||
|
||||
printf("Sending to new map\n");
|
||||
// G7TAJ //
|
||||
char MHJSON[50000];
|
||||
char * mhptr;
|
||||
char * b4Routesptr;
|
||||
|
||||
MHJSON[0]=0;
|
||||
// G7TAJ //
|
||||
|
||||
// printf("Sending to new map\n");
|
||||
|
||||
sprintf(Request, "/api/NodeData/%s", MYNODECALL);
|
||||
|
||||
|
@ -5056,6 +5134,11 @@ void SendDataToPktMap(char *Msg)
|
|||
#endif
|
||||
ptr += sprintf(ptr, "\"source\": \"ReportedByNode\",\r\n");
|
||||
|
||||
// G7TAJ //
|
||||
sprintf(MHJSON, ",\"mheard\": [");
|
||||
// G7TAJ //
|
||||
|
||||
|
||||
//Ports
|
||||
|
||||
ptr += sprintf(ptr, "\"ports\": [");
|
||||
|
@ -5256,12 +5339,25 @@ void SendDataToPktMap(char *Msg)
|
|||
|
||||
if (Active)
|
||||
{
|
||||
char * ptr2 = &ID[29];
|
||||
strcpy(ID, PORT->PORTDESCRIPTION);
|
||||
while (*(ptr2) == ' ' && ptr2 != ID)
|
||||
*(ptr2--) = 0;
|
||||
|
||||
ptr += sprintf(ptr, "{\"id\": \"%d\",\"linkType\": \"%s\","
|
||||
"\"freq\": \"%lld\",\"mode\": \"%s\",\"modulation\": \"%s\","
|
||||
"\"baud\": \"%d\",\"bitrate\": \"%d\",\"usage\": \"%s\",\"comment\": \"%s\"},\r\n",
|
||||
PortNo, Type,
|
||||
Freq, Mode, Modulation,
|
||||
Baud, Bitrate, "Access", PORT->PORTDESCRIPTION);
|
||||
Baud, Bitrate, "Access", ID);
|
||||
|
||||
// G7TAJ //
|
||||
// make MH list to be added later
|
||||
BuildPortMH(MHJSON, PORT);
|
||||
|
||||
// G7TAJ //
|
||||
|
||||
|
||||
}
|
||||
|
||||
PORT = PORT->PORTPOINTER;
|
||||
|
@ -5272,6 +5368,10 @@ void SendDataToPktMap(char *Msg)
|
|||
|
||||
// Neighbours
|
||||
|
||||
// G7TAJ //
|
||||
b4Routesptr = ptr-3;
|
||||
// G7TAJ //
|
||||
|
||||
ptr += sprintf(ptr, "\"neighbours\": [\r\n");
|
||||
|
||||
while (MaxRoutes--)
|
||||
|
@ -5290,8 +5390,30 @@ void SendDataToPktMap(char *Msg)
|
|||
Routes++;
|
||||
}
|
||||
|
||||
// G7TAJ //
|
||||
|
||||
// if !strstr quality, then there are none, so remove neighbours portion
|
||||
if ( strstr(Params, "quality") == NULL ) {
|
||||
ptr = b4Routesptr;
|
||||
} else {
|
||||
ptr -= 3;
|
||||
ptr += sprintf(ptr, "]}");
|
||||
ptr += sprintf(ptr, "]");
|
||||
}
|
||||
|
||||
if ( strlen(MHJSON) > 15 ) {
|
||||
mhptr = MHJSON + strlen(MHJSON);
|
||||
mhptr -= 3;
|
||||
sprintf(mhptr, "]\r\n");
|
||||
ptr += sprintf(ptr, "\r\n%s", MHJSON);
|
||||
|
||||
}
|
||||
|
||||
ptr += sprintf(ptr, "}");
|
||||
|
||||
|
||||
|
||||
// G7TAJ //
|
||||
|
||||
|
||||
/*
|
||||
{
|
||||
|
|
|
@ -11,6 +11,7 @@ void GetVersionInfo(char * File)
|
|||
char isDebug[40]="";
|
||||
|
||||
#ifdef SPECIALVERSION
|
||||
strcat(isDebug, " ");
|
||||
strcat(isDebug, SPECIALVERSION);
|
||||
#endif
|
||||
#ifdef _DEBUG
|
||||
|
|
44
IPCode.c
44
IPCode.c
|
@ -4539,6 +4539,50 @@ void OpenTAP()
|
|||
return;
|
||||
}
|
||||
|
||||
// Fix from github user isavitsky
|
||||
|
||||
/*
|
||||
* After some research I found that on most of my
|
||||
* systems, including Raspberry Pi IV, a slight delay
|
||||
* is needed before considering the TAP device
|
||||
* up and running. Otherwise the interface structures
|
||||
* do not initialise properly and later in the code
|
||||
* around the line 4700 when we initialise our ARP
|
||||
* structure:
|
||||
*
|
||||
* memcpy(Arp->HWADDR, xbuffer.ifr_hwaddr.sa_data, 6);
|
||||
*
|
||||
* the MAC address is getting filled in with random
|
||||
* value which makes the communication via our TAP
|
||||
* device using the configured IPADDR virtually
|
||||
* impossible.
|
||||
*
|
||||
*/
|
||||
|
||||
Debugprintf("Waiting for the TAP to become UP and RUNNING");
|
||||
|
||||
for (int i=10; i>0; i--)
|
||||
{
|
||||
Sleep(10);
|
||||
|
||||
if ((err = ioctl(sockfd, SIOCGIFFLAGS, &ifr)) < 0)
|
||||
{
|
||||
perror("SIOCGIFFLAGS");
|
||||
return;
|
||||
}
|
||||
|
||||
if((ifr.ifr_flags & IFF_UP) && (ifr.ifr_flags & IFF_RUNNING))
|
||||
{
|
||||
Debugprintf("TAP is UP and RUNNING");
|
||||
break;
|
||||
}
|
||||
else if (i == 1)
|
||||
{
|
||||
Debugprintf("TAP is still not UP and RUNNING");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
printf("TAP brought up\n");
|
||||
|
||||
// Set MTU to 256
|
||||
|
|
|
@ -1,65 +0,0 @@
|
|||
<?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="DESKTOP-TGEL8RC"
|
||||
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="DESKTOP-TGEL8RC"
|
||||
RemoteCommand=""
|
||||
HttpUrl=""
|
||||
PDBPath=""
|
||||
SQLDebugging=""
|
||||
Environment=""
|
||||
EnvironmentMerge="true"
|
||||
DebuggerFlavor=""
|
||||
MPIRunCommand=""
|
||||
MPIRunArguments=""
|
||||
MPIRunWorkingDirectory=""
|
||||
ApplicationCommand=""
|
||||
ApplicationArguments=""
|
||||
ShimCommand=""
|
||||
MPIAcceptMode=""
|
||||
MPIAcceptFilter=""
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
</VisualStudioUserFile>
|
240
NNTPRoutines.c
240
NNTPRoutines.c
|
@ -41,6 +41,87 @@ char *day[] = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"};
|
|||
|
||||
VOID ReleaseNNTPSock(SOCKET sock);
|
||||
|
||||
int NNTPSendSock(SocketConn * sockptr, char * msg)
|
||||
{
|
||||
int len = (int)strlen(msg);
|
||||
char * newmsg = malloc(len+10);
|
||||
|
||||
WriteLogLine(NULL, '>',msg, len, LOG_TCP);
|
||||
|
||||
strcpy(newmsg, msg);
|
||||
|
||||
strcat(newmsg, "\r\n");
|
||||
|
||||
len+=2;
|
||||
|
||||
// Attempt to fix Thunderbird - Queue all and send at end
|
||||
|
||||
if ((sockptr->SendSize + len) > sockptr->SendBufferSize)
|
||||
{
|
||||
sockptr->SendBufferSize += (10000 + len);
|
||||
sockptr->SendBuffer = realloc(sockptr->SendBuffer, sockptr->SendBufferSize);
|
||||
}
|
||||
|
||||
memcpy(&sockptr->SendBuffer[sockptr->SendSize], newmsg, len);
|
||||
sockptr->SendSize += len;
|
||||
free (newmsg);
|
||||
return len;
|
||||
}
|
||||
|
||||
void NNTPFlush(SocketConn * sockptr)
|
||||
{
|
||||
int sent;
|
||||
|
||||
sent = send(sockptr->socket, sockptr->SendBuffer, sockptr->SendSize, 0);
|
||||
|
||||
if (sent < sockptr->SendSize)
|
||||
{
|
||||
int error, remains;
|
||||
|
||||
// Not all could be sent - queue rest
|
||||
|
||||
if (sent == SOCKET_ERROR)
|
||||
{
|
||||
error = WSAGetLastError();
|
||||
if (error == WSAEWOULDBLOCK)
|
||||
sent=0;
|
||||
|
||||
// What else??
|
||||
}
|
||||
|
||||
remains = sockptr->SendSize - sent;
|
||||
|
||||
sockptr->SendBufferSize += (10000 + remains);
|
||||
sockptr->SendBuffer = malloc(sockptr->SendBufferSize);
|
||||
|
||||
memmove(sockptr->SendBuffer, &sockptr->SendBuffer[sent], remains);
|
||||
|
||||
sockptr->SendSize = remains;
|
||||
sockptr->SendPtr = 0;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
free(sockptr->SendBuffer);
|
||||
sockptr->SendBuffer = NULL;
|
||||
sockptr->SendSize = 0;
|
||||
sockptr->SendBufferSize = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
VOID __cdecl NNTPsockprintf(SocketConn * sockptr, const char * format, ...)
|
||||
{
|
||||
// printf to a socket
|
||||
|
||||
char buff[1000];
|
||||
va_list(arglist);
|
||||
|
||||
va_start(arglist, format);
|
||||
vsprintf(buff, format, arglist);
|
||||
|
||||
NNTPSendSock(sockptr, buff);
|
||||
}
|
||||
|
||||
struct NNTPRec * LookupNNTP(char * Group)
|
||||
{
|
||||
struct NNTPRec * ptr = FirstNNTPRec;
|
||||
|
@ -304,7 +385,7 @@ VOID ProcessNNTPServerMessage(SocketConn * sockptr, char * Buffer, int Len)
|
|||
|
||||
if (ptr2 == NULL)
|
||||
{
|
||||
SendSock(sockptr, "500 Eh");
|
||||
NNTPSendSock(sockptr, "500 Eh");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -428,7 +509,7 @@ VOID ProcessNNTPServerMessage(SocketConn * sockptr, char * Buffer, int Len)
|
|||
|
||||
sockptr->Flags &= ~GETTINGMESSAGE;
|
||||
|
||||
SendSock(sockptr, "240 OK");
|
||||
NNTPSendSock(sockptr, "240 OK");
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -459,13 +540,13 @@ VOID ProcessNNTPServerMessage(SocketConn * sockptr, char * Buffer, int Len)
|
|||
if (Len > 22) Buffer[22]=0;
|
||||
strcpy(sockptr->CallSign, &Buffer[14]);
|
||||
sockptr->State = GettingPass;
|
||||
sockprintf(sockptr, "381 More authentication information required");
|
||||
NNTPsockprintf(sockptr, "381 More authentication information required");
|
||||
return;
|
||||
}
|
||||
|
||||
if (sockptr->State == GettingUser)
|
||||
{
|
||||
sockprintf(sockptr, "480 Authentication required");
|
||||
NNTPsockprintf(sockptr, "480 Authentication required");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -481,19 +562,19 @@ VOID ProcessNNTPServerMessage(SocketConn * sockptr, char * Buffer, int Len)
|
|||
{
|
||||
if (strcmp(user->pass, &Buffer[14]) == 0)
|
||||
{
|
||||
sockprintf(sockptr, "281 Authentication accepted");
|
||||
NNTPsockprintf(sockptr, "281 Authentication accepted");
|
||||
|
||||
sockptr->State = Authenticated;
|
||||
sockptr->POP3User = user;
|
||||
return;
|
||||
}
|
||||
}
|
||||
SendSock(sockptr, "482 Authentication rejected");
|
||||
NNTPSendSock(sockptr, "482 Authentication rejected");
|
||||
sockptr->State = GettingUser;
|
||||
return;
|
||||
}
|
||||
|
||||
sockprintf(sockptr, "480 Authentication required");
|
||||
NNTPsockprintf(sockptr, "480 Authentication required");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -506,7 +587,7 @@ VOID ProcessNNTPServerMessage(SocketConn * sockptr, char * Buffer, int Len)
|
|||
{
|
||||
if (_stricmp(REC->NewsGroup, &Buffer[6]) == 0)
|
||||
{
|
||||
sockprintf(sockptr, "211 %d %d %d %s", REC->Count, REC->FirstMsg, REC->LastMsg, REC->NewsGroup);
|
||||
NNTPsockprintf(sockptr, "211 %d %d %d %s", REC->Count, REC->FirstMsg, REC->LastMsg, REC->NewsGroup);
|
||||
sockptr->NNTPNum = 0;
|
||||
sockptr->NNTPGroup = REC;
|
||||
return;
|
||||
|
@ -514,7 +595,7 @@ VOID ProcessNNTPServerMessage(SocketConn * sockptr, char * Buffer, int Len)
|
|||
REC =REC->Next;
|
||||
}
|
||||
|
||||
sockprintf(sockptr, "411 no such news group");
|
||||
NNTPsockprintf(sockptr, "411 no such news group");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -528,7 +609,7 @@ VOID ProcessNNTPServerMessage(SocketConn * sockptr, char * Buffer, int Len)
|
|||
|
||||
if (REC == NULL && Buffer[10] == 0)
|
||||
{
|
||||
sockprintf(sockptr, "412 No Group Selected");
|
||||
NNTPsockprintf(sockptr, "412 No Group Selected");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -543,7 +624,7 @@ VOID ProcessNNTPServerMessage(SocketConn * sockptr, char * Buffer, int Len)
|
|||
{
|
||||
GotGroup:
|
||||
|
||||
sockprintf(sockptr, "211 Article Numbers Follows");
|
||||
NNTPsockprintf(sockptr, "211 Article Numbers Follows");
|
||||
sockptr->NNTPNum = 0;
|
||||
sockptr->NNTPGroup = REC;
|
||||
|
||||
|
@ -557,22 +638,22 @@ VOID ProcessNNTPServerMessage(SocketConn * sockptr, char * Buffer, int Len)
|
|||
sprintf(FullGroup, "%s.%s", Msg->to, Msg->via );
|
||||
if (_stricmp(FullGroup, REC->NewsGroup) == 0)
|
||||
{
|
||||
sockprintf(sockptr, "%d", MsgNo);
|
||||
NNTPsockprintf(sockptr, "%d", MsgNo);
|
||||
}
|
||||
}
|
||||
}
|
||||
SendSock(sockptr,".");
|
||||
NNTPSendSock(sockptr,".");
|
||||
return;
|
||||
}
|
||||
REC = REC->Next;
|
||||
}
|
||||
sockprintf(sockptr, "411 no such news group");
|
||||
NNTPsockprintf(sockptr, "411 no such news group");
|
||||
return;
|
||||
}
|
||||
|
||||
if(_memicmp(Buffer, "MODE READER", 11) == 0)
|
||||
{
|
||||
SendSock(sockptr, "200 Hello");
|
||||
NNTPSendSock(sockptr, "200 Hello");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -580,15 +661,15 @@ VOID ProcessNNTPServerMessage(SocketConn * sockptr, char * Buffer, int Len)
|
|||
{
|
||||
struct NNTPRec * REC = FirstNNTPRec;
|
||||
|
||||
SendSock(sockptr, "215 list of newsgroups follows");
|
||||
NNTPSendSock(sockptr, "215 list of newsgroups follows");
|
||||
|
||||
while (REC)
|
||||
{
|
||||
sockprintf(sockptr, "%s %d %d y", REC->NewsGroup, REC->LastMsg, REC->FirstMsg);
|
||||
NNTPsockprintf(sockptr, "%s %d %d y", REC->NewsGroup, REC->LastMsg, REC->FirstMsg);
|
||||
REC = REC->Next;
|
||||
}
|
||||
|
||||
SendSock(sockptr,".");
|
||||
NNTPSendSock(sockptr,".");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -615,16 +696,16 @@ VOID ProcessNNTPServerMessage(SocketConn * sockptr, char * Buffer, int Len)
|
|||
else
|
||||
Time = mktime(&rtime);
|
||||
|
||||
SendSock(sockptr, "231 list of new newsgroups follows");
|
||||
NNTPSendSock(sockptr, "231 list of new newsgroups follows");
|
||||
|
||||
while(REC)
|
||||
{
|
||||
if (REC->DateCreated > Time)
|
||||
sockprintf(sockptr, "%s %d %d y", REC->NewsGroup, REC->LastMsg, REC->FirstMsg);
|
||||
NNTPsockprintf(sockptr, "%s %d %d y", REC->NewsGroup, REC->LastMsg, REC->FirstMsg);
|
||||
REC = REC->Next;
|
||||
}
|
||||
|
||||
SendSock(sockptr,".");
|
||||
NNTPSendSock(sockptr,".");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -636,7 +717,7 @@ VOID ProcessNNTPServerMessage(SocketConn * sockptr, char * Buffer, int Len)
|
|||
|
||||
if (REC == NULL)
|
||||
{
|
||||
SendSock(sockptr,"412 no newsgroup has been selected");
|
||||
NNTPSendSock(sockptr,"412 no newsgroup has been selected");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -646,7 +727,7 @@ VOID ProcessNNTPServerMessage(SocketConn * sockptr, char * Buffer, int Len)
|
|||
|
||||
if (MsgNo == 0)
|
||||
{
|
||||
SendSock(sockptr,"420 no current article has been selected");
|
||||
NNTPSendSock(sockptr,"420 no current article has been selected");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -659,20 +740,20 @@ VOID ProcessNNTPServerMessage(SocketConn * sockptr, char * Buffer, int Len)
|
|||
|
||||
if (Msg)
|
||||
{
|
||||
sockprintf(sockptr, "221 %d <%s>", MsgNo, Msg->bid);
|
||||
NNTPsockprintf(sockptr, "221 %d <%s>", MsgNo, Msg->bid);
|
||||
|
||||
sockprintf(sockptr, "From: %s", Msg->from);
|
||||
sockprintf(sockptr, "Date: %s", FormatNNTPDateAndTime((time_t)Msg->datecreated));
|
||||
sockprintf(sockptr, "Newsgroups: %s.s", Msg->to, Msg->via);
|
||||
sockprintf(sockptr, "Subject: %s", Msg->title);
|
||||
sockprintf(sockptr, "Message-ID: <%s>", Msg->bid);
|
||||
sockprintf(sockptr, "Path: %s", BBSName);
|
||||
NNTPsockprintf(sockptr, "From: %s", Msg->from);
|
||||
NNTPsockprintf(sockptr, "Date: %s", FormatNNTPDateAndTime((time_t)Msg->datecreated));
|
||||
NNTPsockprintf(sockptr, "Newsgroups: %s.s", Msg->to, Msg->via);
|
||||
NNTPsockprintf(sockptr, "Subject: %s", Msg->title);
|
||||
NNTPsockprintf(sockptr, "Message-ID: <%s>", Msg->bid);
|
||||
NNTPsockprintf(sockptr, "Path: %s", BBSName);
|
||||
|
||||
SendSock(sockptr,".");
|
||||
NNTPSendSock(sockptr,".");
|
||||
return;
|
||||
}
|
||||
|
||||
SendSock(sockptr,"423 No such article in this newsgroup");
|
||||
NNTPSendSock(sockptr,"423 No such article in this newsgroup");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -686,7 +767,7 @@ VOID ProcessNNTPServerMessage(SocketConn * sockptr, char * Buffer, int Len)
|
|||
|
||||
if (REC == NULL)
|
||||
{
|
||||
SendSock(sockptr,"412 no newsgroup has been selected");
|
||||
NNTPSendSock(sockptr,"412 no newsgroup has been selected");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -696,7 +777,7 @@ VOID ProcessNNTPServerMessage(SocketConn * sockptr, char * Buffer, int Len)
|
|||
|
||||
if (MsgNo == 0)
|
||||
{
|
||||
SendSock(sockptr,"420 no current article has been selected");
|
||||
NNTPSendSock(sockptr,"420 no current article has been selected");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -709,25 +790,25 @@ VOID ProcessNNTPServerMessage(SocketConn * sockptr, char * Buffer, int Len)
|
|||
|
||||
if (Msg)
|
||||
{
|
||||
sockprintf(sockptr, "220 %d <%s>", MsgNo, Msg->bid);
|
||||
NNTPsockprintf(sockptr, "220 %d <%s>", MsgNo, Msg->bid);
|
||||
msgbytes = ReadMessageFile(Msg->number);
|
||||
|
||||
Path = GetPathFromHeaders(msgbytes);
|
||||
|
||||
sockprintf(sockptr, "From: %s", Msg->from);
|
||||
sockprintf(sockptr, "Date: %s", FormatNNTPDateAndTime((time_t)Msg->datecreated));
|
||||
sockprintf(sockptr, "Newsgroups: %s.%s", Msg->to, Msg->via);
|
||||
sockprintf(sockptr, "Subject: %s", Msg->title);
|
||||
sockprintf(sockptr, "Message-ID: <%s>", Msg->bid);
|
||||
sockprintf(sockptr, "Path: %s", &Path[1]);
|
||||
NNTPsockprintf(sockptr, "From: %s", Msg->from);
|
||||
NNTPsockprintf(sockptr, "Date: %s", FormatNNTPDateAndTime((time_t)Msg->datecreated));
|
||||
NNTPsockprintf(sockptr, "Newsgroups: %s.%s", Msg->to, Msg->via);
|
||||
NNTPsockprintf(sockptr, "Subject: %s", Msg->title);
|
||||
NNTPsockprintf(sockptr, "Message-ID: <%s>", Msg->bid);
|
||||
NNTPsockprintf(sockptr, "Path: %s", &Path[1]);
|
||||
|
||||
SendSock(sockptr,"");
|
||||
NNTPSendSock(sockptr,"");
|
||||
|
||||
|
||||
SendSock(sockptr,msgbytes);
|
||||
SendSock(sockptr,"");
|
||||
NNTPSendSock(sockptr,msgbytes);
|
||||
NNTPSendSock(sockptr,"");
|
||||
|
||||
SendSock(sockptr,".");
|
||||
NNTPSendSock(sockptr,".");
|
||||
|
||||
free(msgbytes);
|
||||
free(Path);
|
||||
|
@ -735,7 +816,7 @@ VOID ProcessNNTPServerMessage(SocketConn * sockptr, char * Buffer, int Len)
|
|||
return;
|
||||
|
||||
}
|
||||
SendSock(sockptr,"423 No such article in this newsgroup");
|
||||
NNTPSendSock(sockptr,"423 No such article in this newsgroup");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -749,7 +830,7 @@ VOID ProcessNNTPServerMessage(SocketConn * sockptr, char * Buffer, int Len)
|
|||
|
||||
if (REC == NULL)
|
||||
{
|
||||
SendSock(sockptr,"412 no newsgroup has been selected");
|
||||
NNTPSendSock(sockptr,"412 no newsgroup has been selected");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -759,7 +840,7 @@ VOID ProcessNNTPServerMessage(SocketConn * sockptr, char * Buffer, int Len)
|
|||
|
||||
if (MsgNo == 0)
|
||||
{
|
||||
SendSock(sockptr,"420 no current article has been selected");
|
||||
NNTPSendSock(sockptr,"420 no current article has been selected");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -772,15 +853,15 @@ VOID ProcessNNTPServerMessage(SocketConn * sockptr, char * Buffer, int Len)
|
|||
|
||||
if (Msg)
|
||||
{
|
||||
sockprintf(sockptr, "222 %d <%s>", MsgNo, Msg->bid);
|
||||
NNTPsockprintf(sockptr, "222 %d <%s>", MsgNo, Msg->bid);
|
||||
msgbytes = ReadMessageFile(Msg->number);
|
||||
|
||||
Path = GetPathFromHeaders(msgbytes);
|
||||
|
||||
SendSock(sockptr,msgbytes);
|
||||
SendSock(sockptr,"");
|
||||
NNTPSendSock(sockptr,msgbytes);
|
||||
NNTPSendSock(sockptr,"");
|
||||
|
||||
SendSock(sockptr,".");
|
||||
NNTPSendSock(sockptr,".");
|
||||
|
||||
free(msgbytes);
|
||||
free(Path);
|
||||
|
@ -788,7 +869,7 @@ VOID ProcessNNTPServerMessage(SocketConn * sockptr, char * Buffer, int Len)
|
|||
return;
|
||||
|
||||
}
|
||||
SendSock(sockptr,"423 No such article in this newsgroup");
|
||||
NNTPSendSock(sockptr,"423 No such article in this newsgroup");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -801,7 +882,7 @@ VOID ProcessNNTPServerMessage(SocketConn * sockptr, char * Buffer, int Len)
|
|||
|
||||
if (REC == NULL)
|
||||
{
|
||||
SendSock(sockptr,"412 no newsgroup has been selected");
|
||||
NNTPSendSock(sockptr,"412 no newsgroup has been selected");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -821,7 +902,7 @@ VOID ProcessNNTPServerMessage(SocketConn * sockptr, char * Buffer, int Len)
|
|||
|
||||
if (MsgStart == 0)
|
||||
{
|
||||
SendSock(sockptr,"420 no current article has been selected");
|
||||
NNTPSendSock(sockptr,"420 no current article has been selected");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -830,7 +911,7 @@ VOID ProcessNNTPServerMessage(SocketConn * sockptr, char * Buffer, int Len)
|
|||
sockptr->NNTPNum = MsgEnd;
|
||||
}
|
||||
|
||||
sockprintf(sockptr, "221 ");
|
||||
NNTPsockprintf(sockptr, "221 ");
|
||||
|
||||
for (MsgNo = MsgStart; MsgNo <= MsgEnd; MsgNo++)
|
||||
{
|
||||
|
@ -843,20 +924,20 @@ VOID ProcessNNTPServerMessage(SocketConn * sockptr, char * Buffer, int Len)
|
|||
if (_stricmp(FullGroup, REC->NewsGroup) == 0)
|
||||
{
|
||||
if (_stricmp(Header, "subject") == 0)
|
||||
sockprintf(sockptr, "%d Subject: %s", MsgNo, Msg->title);
|
||||
NNTPsockprintf(sockptr, "%d Subject: %s", MsgNo, Msg->title);
|
||||
else if (_stricmp(Header, "from") == 0)
|
||||
sockprintf(sockptr, "%d From: %s", MsgNo, Msg->from);
|
||||
NNTPsockprintf(sockptr, "%d From: %s", MsgNo, Msg->from);
|
||||
else if (_stricmp(Header, "date") == 0)
|
||||
sockprintf(sockptr, "%d Date: %s", MsgNo, FormatNNTPDateAndTime((time_t)Msg->datecreated));
|
||||
NNTPsockprintf(sockptr, "%d Date: %s", MsgNo, FormatNNTPDateAndTime((time_t)Msg->datecreated));
|
||||
else if (_stricmp(Header, "message-id") == 0)
|
||||
sockprintf(sockptr, "%d Message-ID: <%s>", MsgNo, Msg->bid);
|
||||
NNTPsockprintf(sockptr, "%d Message-ID: <%s>", MsgNo, Msg->bid);
|
||||
else if (_stricmp(Header, "lines") == 0)
|
||||
sockprintf(sockptr, "%d Lines: %d", MsgNo, Msg->length);
|
||||
NNTPsockprintf(sockptr, "%d Lines: %d", MsgNo, Msg->length);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SendSock(sockptr,".");
|
||||
NNTPSendSock(sockptr,".");
|
||||
return;
|
||||
|
||||
}
|
||||
|
@ -869,7 +950,7 @@ VOID ProcessNNTPServerMessage(SocketConn * sockptr, char * Buffer, int Len)
|
|||
|
||||
if (REC == NULL)
|
||||
{
|
||||
SendSock(sockptr,"412 no newsgroup has been selected");
|
||||
NNTPSendSock(sockptr,"412 no newsgroup has been selected");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -887,7 +968,7 @@ VOID ProcessNNTPServerMessage(SocketConn * sockptr, char * Buffer, int Len)
|
|||
|
||||
if (MsgStart == 0)
|
||||
{
|
||||
SendSock(sockptr,"420 no current article has been selected");
|
||||
NNTPSendSock(sockptr,"420 no current article has been selected");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -896,7 +977,7 @@ VOID ProcessNNTPServerMessage(SocketConn * sockptr, char * Buffer, int Len)
|
|||
sockptr->NNTPNum = MsgEnd;
|
||||
}
|
||||
|
||||
sockprintf(sockptr, "224 ");
|
||||
NNTPsockprintf(sockptr, "224 ");
|
||||
|
||||
for (MsgNo = MsgStart; MsgNo <= MsgEnd; MsgNo++)
|
||||
{
|
||||
|
@ -909,14 +990,14 @@ VOID ProcessNNTPServerMessage(SocketConn * sockptr, char * Buffer, int Len)
|
|||
if (_stricmp(FullGroup, REC->NewsGroup) == 0)
|
||||
{
|
||||
// subject, author, date, message-id, references, byte count, and line count.
|
||||
sockprintf(sockptr, "%d\t%s\t%s\t%s\t%s\t%s\t%d\t%d",
|
||||
NNTPsockprintf(sockptr, "%d\t%s\t%s\t%s\t%s\t%s\t%d\t%d",
|
||||
MsgNo, Msg->title, Msg->from, FormatNNTPDateAndTime((time_t)Msg->datecreated), Msg->bid,
|
||||
"", Msg->length, Msg->length);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SendSock(sockptr,".");
|
||||
NNTPSendSock(sockptr,".");
|
||||
return;
|
||||
|
||||
}
|
||||
|
@ -932,7 +1013,7 @@ VOID ProcessNNTPServerMessage(SocketConn * sockptr, char * Buffer, int Len)
|
|||
{
|
||||
if (sockptr->State != Authenticated)
|
||||
{
|
||||
sockprintf(sockptr, "480 Authentication required");
|
||||
NNTPsockprintf(sockptr, "480 Authentication required");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -942,7 +1023,7 @@ VOID ProcessNNTPServerMessage(SocketConn * sockptr, char * Buffer, int Len)
|
|||
if (sockptr->MailBuffer == NULL)
|
||||
{
|
||||
CriticalErrorHandler("Failed to create POP3 Message Buffer");
|
||||
SendSock(sockptr, "QUIT");
|
||||
NNTPSendSock(sockptr, "QUIT");
|
||||
sockptr->State = WaitingForQUITResponse;
|
||||
shutdown(sock, 0);
|
||||
|
||||
|
@ -951,7 +1032,7 @@ VOID ProcessNNTPServerMessage(SocketConn * sockptr, char * Buffer, int Len)
|
|||
|
||||
sockptr->Flags |= GETTINGMESSAGE;
|
||||
|
||||
SendSock(sockptr, "340 OK");
|
||||
NNTPSendSock(sockptr, "340 OK");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -959,7 +1040,7 @@ VOID ProcessNNTPServerMessage(SocketConn * sockptr, char * Buffer, int Len)
|
|||
|
||||
if(_memicmp(Buffer, "QUIT", 4) == 0)
|
||||
{
|
||||
SendSock(sockptr, "205 OK");
|
||||
NNTPSendSock(sockptr, "205 OK");
|
||||
Sleep(500);
|
||||
shutdown(sock, 0);
|
||||
return;
|
||||
|
@ -967,7 +1048,7 @@ VOID ProcessNNTPServerMessage(SocketConn * sockptr, char * Buffer, int Len)
|
|||
|
||||
/* if(memcmp(Buffer, "RSET\r\n", 6) == 0)
|
||||
{
|
||||
SendSock(sockptr, "250 Ok");
|
||||
NNTPSendSock(sockptr, "250 Ok");
|
||||
sockptr->State = 0;
|
||||
sockptr->Recipients;
|
||||
return;
|
||||
|
@ -991,15 +1072,15 @@ VOID ProcessNNTPServerMessage(SocketConn * sockptr, char * Buffer, int Len)
|
|||
sprintf_s(Date, sizeof(Date), "111 %04d%02d%02d%02d%02d%02d",
|
||||
tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec);
|
||||
|
||||
SendSock(sockptr, Date);
|
||||
NNTPSendSock(sockptr, Date);
|
||||
}
|
||||
else
|
||||
SendSock(sockptr, "500 command not recognized");
|
||||
NNTPSendSock(sockptr, "500 command not recognized");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
SendSock(sockptr, "500 command not recognized");
|
||||
NNTPSendSock(sockptr, "500 command not recognized");
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -1068,6 +1149,9 @@ loop:
|
|||
|
||||
}
|
||||
}
|
||||
|
||||
NNTPFlush(sockptr);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1110,9 +1194,11 @@ int NNTP_Accept(SOCKET SocketId)
|
|||
sockptr->socket = sock;
|
||||
sockptr->State = 0;
|
||||
|
||||
SendSock(sockptr, "200 BPQMail NNTP Server ready");
|
||||
NNTPSendSock(sockptr, "200 BPQMail NNTP Server ready");
|
||||
Logprintf(LOG_TCP, NULL, '|', "Incoming NNTP Connect Socket = %d", sock);
|
||||
|
||||
NNTPFlush(sockptr);
|
||||
|
||||
return 0;
|
||||
}
|
||||
/*
|
||||
|
@ -1144,7 +1230,7 @@ int NNTP_Data(int sock, int error, int eventcode)
|
|||
SendFromQueue(sockptr);
|
||||
else
|
||||
{
|
||||
SendSock(sockptr, "200 BPQMail NNTP Server ready");
|
||||
NNTPSendSock(sockptr, "200 BPQMail NNTP Server ready");
|
||||
// sockptr->State = GettingUser;
|
||||
}
|
||||
|
||||
|
|
22
Versions.h
22
Versions.h
|
@ -10,16 +10,16 @@
|
|||
|
||||
#endif
|
||||
|
||||
#define KVers 6,0,24,25
|
||||
#define KVerstring "6.0.24.25\0"
|
||||
#define KVers 6,0,24,27
|
||||
#define KVerstring "6.0.24.27\0"
|
||||
|
||||
#ifdef CKernel
|
||||
|
||||
#define Vers KVers
|
||||
#define Verstring KVerstring
|
||||
#define Datestring "December 2023"
|
||||
#define Datestring "January 2024"
|
||||
#define VerComments "G8BPQ Packet Switch (C Version)" KVerstring
|
||||
#define VerCopyright "Copyright © 2001-2023 John Wiseman G8BPQ\0"
|
||||
#define VerCopyright "Copyright © 2001-2024 John Wiseman G8BPQ\0"
|
||||
#define VerDesc "BPQ32 Switch\0"
|
||||
#define VerProduct "BPQ32"
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
|||
#define Vers 1,0,16,2
|
||||
#define Verstring "1.0.16.2\0"
|
||||
#define VerComments "Internet Terminal for G8BPQ Packet Switch\0"
|
||||
#define VerCopyright "Copyright © 2011-2023 John Wiseman G8BPQ\0"
|
||||
#define VerCopyright "Copyright © 2011-2024 John Wiseman G8BPQ\0"
|
||||
#define VerDesc "Simple TCP Terminal Program for G8BPQ Switch\0"
|
||||
#define VerProduct "BPQTermTCP"
|
||||
|
||||
|
@ -41,7 +41,7 @@
|
|||
#define Vers 2,2,5,2
|
||||
#define Verstring "2.2.5.2\0"
|
||||
#define VerComments "Simple Terminal for G8BPQ Packet Switch\0"
|
||||
#define VerCopyright "Copyright © 1999-2023 John Wiseman G8BPQ\0"
|
||||
#define VerCopyright "Copyright © 1999-2024 John Wiseman G8BPQ\0"
|
||||
#define VerDesc "Simple Terminal Program for G8BPQ Switch\0"
|
||||
#define VerProduct "BPQTerminal"
|
||||
|
||||
|
@ -52,7 +52,7 @@
|
|||
#define Vers 2,2,0,3
|
||||
#define Verstring "2.2.0.3\0"
|
||||
#define VerComments "MDI Terminal for G8BPQ Packet Switch\0"
|
||||
#define VerCopyright "Copyright © 1999-2023 John Wiseman G8BPQ\0"
|
||||
#define VerCopyright "Copyright © 1999-2024 John Wiseman G8BPQ\0"
|
||||
#define VerDesc "MDI Terminal Program for G8BPQ Switch\0"
|
||||
|
||||
#endif
|
||||
|
@ -62,7 +62,7 @@
|
|||
#define Vers KVers
|
||||
#define Verstring KVerstring
|
||||
#define VerComments "Mail server for G8BPQ Packet Switch\0"
|
||||
#define VerCopyright "Copyright © 2009-2023 John Wiseman G8BPQ\0"
|
||||
#define VerCopyright "Copyright © 2009-2024 John Wiseman G8BPQ\0"
|
||||
#define VerDesc "Mail server for G8BPQ's 32 Bit Switch\0"
|
||||
#define VerProduct "BPQMail"
|
||||
|
||||
|
@ -97,7 +97,7 @@
|
|||
#define Vers 0,1,0,0
|
||||
#define Verstring "0.1.0.0\0"
|
||||
#define VerComments "Password Generation Utility for G8BPQ Packet Switch\0"
|
||||
#define VerCopyright "Copyright © 2011-2023 John Wiseman G8BPQ\0"
|
||||
#define VerCopyright "Copyright © 2011-2024 John Wiseman G8BPQ\0"
|
||||
#define VerDesc "Password Generation Utility for G8BPQ Switch\0"
|
||||
|
||||
#endif
|
||||
|
@ -107,7 +107,7 @@
|
|||
#define Vers KVers
|
||||
#define Verstring KVerstring
|
||||
#define VerComments "APRS Client for G8BPQ Switch\0"
|
||||
#define VerCopyright "Copyright © 2012-2023 John Wiseman G8BPQ\0"
|
||||
#define VerCopyright "Copyright © 2012-2024 John Wiseman G8BPQ\0"
|
||||
#define VerDesc "APRS Client for G8BPQ Switch\0"
|
||||
#define VerProduct "BPQAPRS"
|
||||
|
||||
|
@ -118,7 +118,7 @@
|
|||
#define Vers KVers
|
||||
#define Verstring KVerstring
|
||||
#define VerComments "Chat server for G8BPQ Packet Switch\0"
|
||||
#define VerCopyright "Copyright © 2009-2023 John Wiseman G8BPQ\0"
|
||||
#define VerCopyright "Copyright © 2009-2024 John Wiseman G8BPQ\0"
|
||||
#define VerDesc "Chat server for G8BPQ's 32 Bit Switch\0"
|
||||
#define VerProduct "BPQChat"
|
||||
|
||||
|
|
|
@ -1,65 +0,0 @@
|
|||
<?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="DESKTOP-TGEL8RC"
|
||||
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="DESKTOP-TGEL8RC"
|
||||
RemoteCommand=""
|
||||
HttpUrl=""
|
||||
PDBPath=""
|
||||
SQLDebugging=""
|
||||
Environment=""
|
||||
EnvironmentMerge="true"
|
||||
DebuggerFlavor=""
|
||||
MPIRunCommand=""
|
||||
MPIRunArguments=""
|
||||
MPIRunWorkingDirectory=""
|
||||
ApplicationCommand=""
|
||||
ApplicationArguments=""
|
||||
ShimCommand=""
|
||||
MPIAcceptMode=""
|
||||
MPIAcceptFilter=""
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
</VisualStudioUserFile>
|
|
@ -1,65 +0,0 @@
|
|||
<?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="DESKTOP-TGEL8RC"
|
||||
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="DESKTOP-TGEL8RC"
|
||||
RemoteCommand=""
|
||||
HttpUrl=""
|
||||
PDBPath=""
|
||||
SQLDebugging=""
|
||||
Environment=""
|
||||
EnvironmentMerge="true"
|
||||
DebuggerFlavor=""
|
||||
MPIRunCommand=""
|
||||
MPIRunArguments=""
|
||||
MPIRunWorkingDirectory=""
|
||||
ApplicationCommand=""
|
||||
ApplicationArguments=""
|
||||
ShimCommand=""
|
||||
MPIAcceptMode=""
|
||||
MPIAcceptFilter=""
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
</VisualStudioUserFile>
|
|
@ -15,7 +15,7 @@
|
|||
Attach="false"
|
||||
DebuggerType="3"
|
||||
Remote="1"
|
||||
RemoteMachine="DESKTOP-TGEL8RC"
|
||||
RemoteMachine="NOTTSDESKTOP"
|
||||
RemoteCommand=""
|
||||
HttpUrl=""
|
||||
PDBPath=""
|
||||
|
@ -43,7 +43,7 @@
|
|||
Attach="false"
|
||||
DebuggerType="3"
|
||||
Remote="1"
|
||||
RemoteMachine="DESKTOP-TGEL8RC"
|
||||
RemoteMachine="NOTTSDESKTOP"
|
||||
RemoteCommand=""
|
||||
HttpUrl=""
|
||||
PDBPath=""
|
|
@ -1,65 +0,0 @@
|
|||
<?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="DESKTOP-TGEL8RC"
|
||||
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="DESKTOP-TGEL8RC"
|
||||
RemoteCommand=""
|
||||
HttpUrl=""
|
||||
PDBPath=""
|
||||
SQLDebugging=""
|
||||
Environment=""
|
||||
EnvironmentMerge="true"
|
||||
DebuggerFlavor=""
|
||||
MPIRunCommand=""
|
||||
MPIRunArguments=""
|
||||
MPIRunWorkingDirectory=""
|
||||
ApplicationCommand=""
|
||||
ApplicationArguments=""
|
||||
ShimCommand=""
|
||||
MPIAcceptMode=""
|
||||
MPIAcceptFilter=""
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
</VisualStudioUserFile>
|
|
@ -1,65 +0,0 @@
|
|||
<?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>
|
|
@ -15,7 +15,7 @@
|
|||
Attach="false"
|
||||
DebuggerType="3"
|
||||
Remote="1"
|
||||
RemoteMachine="LAPTOP-Q6S4RP5Q"
|
||||
RemoteMachine="NOTTSDESKTOP"
|
||||
RemoteCommand=""
|
||||
HttpUrl=""
|
||||
PDBPath=""
|
||||
|
@ -43,7 +43,7 @@
|
|||
Attach="false"
|
||||
DebuggerType="3"
|
||||
Remote="1"
|
||||
RemoteMachine="LAPTOP-Q6S4RP5Q"
|
||||
RemoteMachine="NOTTSDESKTOP"
|
||||
RemoteCommand=""
|
||||
HttpUrl=""
|
||||
PDBPath=""
|
3161
bbshtmlconfig.c~
3161
bbshtmlconfig.c~
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue