From 1c7aa0f0dcf5225cd8236f84b1a81c019b776706 Mon Sep 17 00:00:00 2001 From: Pekka Riikonen Date: Sat, 31 Mar 2001 12:56:58 +0000 Subject: [PATCH] updates. --- CHANGES | 8 ++++++++ apps/silcd/server.c | 2 +- lib/silcclient/client.c | 2 +- lib/silccore/silcpacket.c | 2 ++ 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index e8eedcd3..8a978982 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,11 @@ +Sat Mar 31 15:38:36 EEST 2001 Pekka Riikonen + + * Fixed packet processing on slow links. Partial packets were + never re-processed because the incoming data buffer was cleared + by the application. Application must now directly clear the + sock->inbuf, the packet processing routines handle it. Fixed + this in client library and in server. + Fri Mar 30 16:35:27 EEST 2001 Pekka Riikonen * Fixed the WHOIS and IDENTIFY send reply function to really diff --git a/apps/silcd/server.c b/apps/silcd/server.c index 6a73c0c1..1e63e429 100644 --- a/apps/silcd/server.c +++ b/apps/silcd/server.c @@ -1513,7 +1513,7 @@ SILC_TASK_CALLBACK(silc_server_packet_parse_real) silc_server_packet_parse_type(server, sock, packet); out: - silc_buffer_clear(sock->inbuf); + /* silc_buffer_clear(sock->inbuf); */ silc_packet_context_free(packet); silc_free(parse_ctx); } diff --git a/lib/silcclient/client.c b/lib/silcclient/client.c index 8bbf3b10..674c8ce0 100644 --- a/lib/silcclient/client.c +++ b/lib/silcclient/client.c @@ -744,7 +744,7 @@ SILC_TASK_CALLBACK(silc_client_packet_parse_real) silc_client_packet_parse_type(client, sock, packet); out: - silc_buffer_clear(sock->inbuf); + /* silc_buffer_clear(sock->inbuf); */ silc_packet_context_free(packet); silc_free(parse_ctx); } diff --git a/lib/silccore/silcpacket.c b/lib/silccore/silcpacket.c index b879c429..3e67ed11 100644 --- a/lib/silccore/silcpacket.c +++ b/lib/silccore/silcpacket.c @@ -390,6 +390,7 @@ void silc_packet_receive_process(SilcSocketConnection sock, if (packetlen < SILC_PACKET_MIN_LEN) { SILC_LOG_DEBUG(("Received invalid packet, dropped")); + silc_buffer_clear(sock->inbuf); return; } @@ -427,6 +428,7 @@ void silc_packet_receive_process(SilcSocketConnection sock, silc_buffer_pull(sock->inbuf, mac_len); } + SILC_LOG_DEBUG(("Clearing inbound buffer")); silc_buffer_clear(sock->inbuf); } -- 2.24.0