summaryrefslogtreecommitdiff
path: root/AGWAPI.c
diff options
context:
space:
mode:
authorDave Hibberd <hibby@debian.org>2026-09-29 21:39:24 +0100
committerDave Hibberd <hibby@debian.org>2026-09-29 21:39:24 +0100
commit592e5967b8fcd79423802071319d0c646f2080df (patch)
tree0eef3a28cfe1a939caf9d61e419a56d79b3c38e3 /AGWAPI.c
parent23de03a0c8bf8a564cc0442f49d050ed11e372b8 (diff)
New upstream version 6.0.25.41+repackupstream/6.0.25.41+repack
Diffstat (limited to 'AGWAPI.c')
-rw-r--r--AGWAPI.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/AGWAPI.c b/AGWAPI.c
index 5dc2f9c..590d62d 100644
--- a/AGWAPI.c
+++ b/AGWAPI.c
@@ -550,16 +550,20 @@ int AGWConnected(struct BPQConnectionInfo * Con, int Stream)
if (ApplCall[i]==32)
ApplCall[i]=0;
-// See if incomming connection
+// See if incoming connection
if (Con->Listening)
{
// Allocate Session and send "c" Message
//
// Find an AGW session
+
+ Debugprintf("Incoming AGW Call for ApplCall %s", ApplCall);
for (sockptr=&Sockets[1]; sockptr <= &Sockets[CurrentSockets]; sockptr++)
{
+ Debugprintf("Trying Socket %d, Calls %s %s", i, sockptr->CallSign1, sockptr->CallSign2);
+
if (sockptr->SocketActive &&
(memcmp(sockptr->CallSign1, ApplCall, 10) == 0) || (memcmp(sockptr->CallSign2, ApplCall, 10) == 0))
{
@@ -572,6 +576,7 @@ int AGWConnected(struct BPQConnectionInfo * Con, int Stream)
int maxframe;
int l4window;
+ Debugprintf("Connection Found, Checking for duplicate calls");
keyptr=(byte *)&Con->CallKey;
@@ -594,13 +599,13 @@ int AGWConnected(struct BPQConnectionInfo * Con, int Stream)
for (i = 0; i < CurrentConnections; i++)
{
- if (Con->BPQStream == Stream)
+ if (AGWConnections[i].BPQStream == Stream)
continue; // Dont Check ourself!
if (AGWConnections[i].SocketIndex == sockptr &&
memcmp(&Con->CallKey, &AGWConnections[i].CallKey,21) == 0)
{
- SendMsg(Stream, "AGWtoBPQ - Callsign is already connected\r", 43);
+ SendMsg(Stream, "AGWAPI - Callsign is already connected\r", 43);
Sleep (500);
Disconnect(Stream);
Con->CallKey[0]=0;
@@ -628,7 +633,7 @@ int AGWConnected(struct BPQConnectionInfo * Con, int Stream)
// Not listening ??
- OutputDebugString("Inbound Connection on Outgoing Stream");
+ Debugprintf("Inbound Connection on Outgoing Stream");
SendMsg(Stream, "AGWtoBPQ - Inbound Connection on Outgoing Stream\r", 49);
Sleep (500);
@@ -1393,12 +1398,12 @@ int ProcessAGWCommand(struct AGWSocketConnectionInfo * sockptr)
if (sockptr->AGWRXHeader.DataKind == 'V') // Unproto with VIA string
{
Digis = sockptr->MsgData[0]; // Number of digis
-
- if (Digis > 7)
- {
- AGWDataSocket_Disconnect(sockptr);
- return 0;
- }
+
+ if (Digis > 7)
+ {
+ AGWDataSocket_Disconnect(sockptr);
+ return 0;
+ }
for (j = 1; j<= Digis; j++)
{