updates.
authorPekka Riikonen <priikone@silcnet.org>
Sat, 31 Mar 2001 12:56:58 +0000 (12:56 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Sat, 31 Mar 2001 12:56:58 +0000 (12:56 +0000)
CHANGES
apps/silcd/server.c
lib/silcclient/client.c
lib/silccore/silcpacket.c

diff --git a/CHANGES b/CHANGES
index e8eedcd38cc53d3131144e2520027d54b625bb83..8a97898275a2d42015261a95a7d67f73c939e51c 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,11 @@
+Sat Mar 31 15:38:36 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
+
+       * 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 <priikone@poseidon.pspt.fi>
 
        * Fixed the WHOIS and IDENTIFY send reply function to really
index 6a73c0c15322e2974db78cd339b22fc3e6be0bf1..1e63e429fa0a09f65315830926f5043e6a9d2264 100644 (file)
@@ -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);
 }
index 8bbf3b10bdd4fb91437a52800e96e938ad46b15c..674c8ce0ca3e9bcee44ba1bf8c72b315b45f1d2b 100644 (file)
@@ -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);
 }
index b879c42927573e86cf71870e67b9f33897e6dcb3..3e67ed1110dc2d0cdb04ccd8871fdff279e59fb2 100644 (file)
@@ -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);
 }