summaryrefslogtreecommitdiff
path: root/TelnetV6.c
diff options
context:
space:
mode:
authorDave Hibberd <hibby@debian.org>2025-03-04 22:46:52 +0000
committerDave Hibberd <hibby@debian.org>2025-03-04 22:46:52 +0000
commitb128f2a43a16acef50de045ae6526772c04c395e (patch)
tree77971053f1ab7355621a01f0f58c44b6d722c6a3 /TelnetV6.c
parentc858986248f9ee86835be732f413824c0e42d729 (diff)
New upstream version 6.0.24.66+repackupstream/6.0.24.66+repack
Diffstat (limited to 'TelnetV6.c')
-rw-r--r--TelnetV6.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/TelnetV6.c b/TelnetV6.c
index 287118b..62b0885 100644
--- a/TelnetV6.c
+++ b/TelnetV6.c
@@ -4501,7 +4501,7 @@ MsgLoop:
WritetoTrace(Stream, MsgPtr, InputLen, sockptr->ADIF, 'R');
}
- if (InputLen == 8 && memcmp(MsgPtr, ";;;\r\n", 8) == 0)
+ if (InputLen == 8 && memcmp(MsgPtr, ";;;;;;\r\n", 8) == 0)
{
// CMS Keepalive
@@ -5146,7 +5146,13 @@ int DataSocket_ReadHTTP(struct TNCINFO * TNC, struct ConnectionInfo * sockptr, S
}
}
else
+ {
Debugprintf("WebSock Opcode %d Msg %s", Opcode, &MsgPtr[6]);
+ closesocket(sockptr->socket);
+ sockptr->SocketActive = FALSE;
+ ShowConnections(TNC);
+ }
+
sockptr->InputLen = 0;
return 0;
@@ -5467,8 +5473,7 @@ int WriteLog(char * msg)
strcat(Value, "logs/Telnet_");
}
- sprintf(Value, "%s%02d%02d%02d.log", Value,
- tm->tm_year - 100, tm->tm_mon+1, tm->tm_mday);
+ sprintf(&Value[strlen(Value)], "%02d%02d%02d.log", tm->tm_year - 100, tm->tm_mon+1, tm->tm_mday);
if ((file = fopen(Value, "a")) == NULL)
return FALSE;
@@ -5523,8 +5528,7 @@ VOID WriteCMSLog(char * msg)
strcat(Value, "logs/CMSAccess");
}
- sprintf(Value, "%s_%04d%02d%02d.log", Value,
- tm->tm_year +1900, tm->tm_mon+1, tm->tm_mday);
+ sprintf(&Value[strlen(Value)], "_%04d%02d%02d.log", tm->tm_year +1900, tm->tm_mon+1, tm->tm_mday);
Handle = fopen(Value, "ab");