updates
authorPekka Riikonen <priikone@silcnet.org>
Sat, 30 Sep 2000 14:11:40 +0000 (14:11 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Sat, 30 Sep 2000 14:11:40 +0000 (14:11 +0000)
CHANGES
configure.in
lib/silccore/silcpacket.c

diff --git a/CHANGES b/CHANGES
index 43126dd0477b355abdc175eed43abd739c91977a..8e9b2a37fe2974a0cb849017a8801d9d1c841cf0 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,11 @@
+Sat Sep 30 16:57:42 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
+
+       * Removed the function just added to lib/silcutil/silcschedule.[ch].
+
+       * Cras fixed and optimized the packet handling even further and
+         it should work now.  Minor change to the prototype of function
+         silc_packet_receive_process in lib/silccore/silcpacket.[ch].
+
 Sat Sep 30 08:48:47 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
 
        * Added new function into lib/silcutil/silcschedule.[ch]:
index c057ff87ffabc43a1cd8ab06e17fd2957411262f..b5e8a441f6b6b8967dbbcc3e78e4411799c40d29 100644 (file)
@@ -33,7 +33,7 @@ case "$target" in
     ;;
 esac
 
-AM_INIT_AUTOMAKE(silc, 29092000)
+AM_INIT_AUTOMAKE(silc, 30092000)
 AC_PREREQ(2.3)
 AM_CONFIG_HEADER(includes/silcdefs.h)
 
index d01e1baaad08ecd7f22ca1d2fcd4e0ef5060e5bd..3642ddb8434f0add6f1fa0a72c3155a1b15531af 100644 (file)
@@ -368,12 +368,17 @@ void silc_packet_receive_process(SilcSocketConnection sock,
   SilcPacketParserContext *parse_ctx;
   int packetlen, paddedlen, count, mac_len = 0;
 
+  /* We need at least 2 bytes of data to be able to start processing
+     the packet. */
+  if (sock->inbuf->len < 2)
+    return;
+
   if (hmac)
     mac_len = hmac->hash->hash->hash_len;
 
   /* Parse the packets from the data */
   count = 0;
-  while (sock->inbuf->len > 2) {
+  while (sock->inbuf->len > 0) {
     SILC_PACKET_LENGTH(sock->inbuf, packetlen, paddedlen);
     paddedlen += 2;
     count++;