summaryrefslogtreecommitdiff
path: root/ChatUtils.c
diff options
context:
space:
mode:
authorg8bpq <john.wiseman@cantab.net>2022-11-23 10:56:20 +0000
committerg8bpq <john.wiseman@cantab.net>2022-11-23 10:56:20 +0000
commitbe0f2b85761c40cbdc7339bbe722fad2d5e1eca4 (patch)
tree540662950bf06baabe89479a73adede3b484c392 /ChatUtils.c
parent6c6848bdcbedcee989fefdd8d39105e7022aeae3 (diff)
6.0.23.2923.30
Diffstat (limited to 'ChatUtils.c')
-rw-r--r--ChatUtils.c76
1 files changed, 0 insertions, 76 deletions
diff --git a/ChatUtils.c b/ChatUtils.c
index bb5f502..651ac6c 100644
--- a/ChatUtils.c
+++ b/ChatUtils.c
@@ -484,82 +484,6 @@ void TrytoSend()
}
}
-
-void ChatFlush(ChatCIRCUIT * conn)
-{
- int tosend, len, sent;
-
- // Try to send data to user. May be stopped by user paging or node flow control
-
- // UCHAR * OutputQueue; // Messages to user
- // int OutputQueueLength; // Total Malloc'ed size. Also Put Pointer for next Message
- // int OutputGetPointer; // Next byte to send. When Getpointer = Quele Length all is sent - free the buffer and start again.
-
- // BOOL Paging; // Set if user wants paging
- // int LinesSent; // Count when paging
- // int PageLen; // Lines per page
-
-
- if (conn->OutputQueue == NULL)
- {
- // Nothing to send. If Close after Flush is set, disconnect
-
- if (conn->CloseAfterFlush)
- {
- conn->CloseAfterFlush--;
-
- if (conn->CloseAfterFlush)
- return;
-
- Disconnect(conn->BPQStream);
- }
-
- return; // Nothing to send
- }
- tosend = conn->OutputQueueLength - conn->OutputGetPointer;
-
- sent=0;
-
- while (tosend > 0)
- {
- if (TXCount(conn->BPQStream) > 4)
- return; // Busy
-
- if (tosend <= conn->paclen)
- len=tosend;
- else
- len=conn->paclen;
-
- GetSemaphore(&OutputSEM, 0);
-
- SendUnbuffered(conn->BPQStream, &conn->OutputQueue[conn->OutputGetPointer], len);
-
- conn->OutputGetPointer+=len;
-
- FreeSemaphore(&OutputSEM);
-
- tosend-=len;
- sent++;
-
- if (sent > 4)
- return;
- }
-
- // All Sent. Free buffers and reset pointers
-
- ChatClearQueue(conn);
-}
-
-VOID ChatClearQueue(ChatCIRCUIT * conn)
-{
- GetSemaphore(&OutputSEM, 0);
-
- conn->OutputGetPointer=0;
- conn->OutputQueueLength=0;
-
- FreeSemaphore(&OutputSEM);
-}
-
/*
char * FormatDateAndTime(time_t Datim, BOOL DateOnly)
{