summaryrefslogtreecommitdiff
path: root/TelnetV6.c
diff options
context:
space:
mode:
authorDave Hibberd <hibby@debian.org>2025-11-22 15:09:21 +0000
committerDave Hibberd <hibby@debian.org>2025-11-22 15:09:21 +0000
commit52e35f45b4cfefc21707b42883dd1afa142ac7d4 (patch)
tree0a9b58677b2f8dad558593277a547b17c38af976 /TelnetV6.c
parent453f162d225b192d5da5a843633208f0307e6afc (diff)
New upstream version 6.0.25.12+repack
Diffstat (limited to 'TelnetV6.c')
-rw-r--r--TelnetV6.c43
1 files changed, 23 insertions, 20 deletions
diff --git a/TelnetV6.c b/TelnetV6.c
index 0761363..590186c 100644
--- a/TelnetV6.c
+++ b/TelnetV6.c
@@ -3874,12 +3874,14 @@ MsgLoop:
LFPtr=memchr(MsgPtr, 10, InputLen);
if (LFPtr == 0)
+ {
if (CRPtr)
{
LFPtr = ++CRPtr;
InputLen++;
}
- if (LFPtr == 0)
+ }
+ if (LFPtr == 0)
{
// Check Paclen
@@ -3895,7 +3897,7 @@ MsgLoop:
}
// Send to Node
-
+
// Line could be up to 500 chars if coming from a program rather than an interative user
// Limit send to node to 255
@@ -3907,16 +3909,16 @@ MsgLoop:
memmove(MsgPtr,MsgPtr+255,InputLen);
}
-
+
SendtoNode(TNC, sockptr->Number, MsgPtr, InputLen);
sockptr->InputLen = 0;
-
+
} // PACLEN
return 0; // No CR
}
-
+
// Got a LF
// Process data up to the cr
@@ -3929,7 +3931,7 @@ MsgLoop:
case 2:
// Normal Data State
-
+
STREAM->bytesRXed += MsgLen;
SendIndex = 0;
@@ -3944,7 +3946,7 @@ MsgLoop:
}
SendtoNode(TNC, sockptr->Number, MsgPtr + SendIndex, MsgLen);
-
+
MsgLen += SendIndex;
// If anything left, copy down buffer, and go back
@@ -3963,20 +3965,20 @@ MsgLoop:
return 0;
case 0:
-
- // Check Username
- //
+
+ // Check Username
+ //
*(LFPtr-1)=0; // remove cr
-
- // send(sock, NLMsg, 2, 0);
- if (LogEnabled)
+ // send(sock, NLMsg, 2, 0);
+
+ if (LogEnabled)
{
char Addr[256];
-
+
Tel_Format_Addr(sockptr, Addr);
-
+
if (strlen(MsgPtr) > 64)
{
MsgPtr[64] = 0;
@@ -4571,7 +4573,8 @@ MsgLoop:
if (P8 == 1)
SendPortsForMonitor(sock, sockptr->UserPointer->Secure);
- sockptr->InputLen = 0;
+
+ sockptr->InputLen = 0;
return 0;
}
}
@@ -6386,10 +6389,10 @@ VOID SaveCMSHostInfo(int port, struct TCPINFO * TCP, int CMSNo)
char ip[256];
int n;
- if (sizeof(time_t) == 4)
- n = sscanf(buf,"%s %d %s", addr, (int *)&t, ip);
- else
- n = sscanf(buf, "%s %lld %s", addr, &t, ip);
+ if (sizeof(time_t) == 4)
+ n = sscanf(buf,"%s %d %s", addr, (int *)&t, ip);
+ else
+ n = sscanf(buf, "%s %lld %s", addr, &t, ip);
if (n == 3)
{