From 3cbf75f5d2f368a01d1a61b76c0911fe8cc12bd7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Niels=20M=C3=B6ller?= <nisse@lysator.liu.se>
Date: Sat, 14 Mar 1998 06:40:46 +0100
Subject: [PATCH] Fixed an ugly ssl_read_callback bug discovered by Rob Young.

Rev: lib/modules/SSL.pmod/sslfile.pike:1.9
---
 lib/modules/SSL.pmod/sslfile.pike | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/lib/modules/SSL.pmod/sslfile.pike b/lib/modules/SSL.pmod/sslfile.pike
index 07e13b021d..c667635397 100644
--- a/lib/modules/SSL.pmod/sslfile.pike
+++ b/lib/modules/SSL.pmod/sslfile.pike
@@ -1,4 +1,4 @@
-/* $Id: sslfile.pike,v 1.8 1998/03/02 19:40:42 grubba Exp $
+/* $Id: sslfile.pike,v 1.9 1998/03/14 05:40:46 nisse Exp $
  *
  */
 
@@ -131,14 +131,12 @@ private void ssl_read_callback(mixed id, string s)
       if (accept_callback)
 	accept_callback(this_object());
     }
-    if (strlen(data))
+
+    read_buffer += data;
+    if (!blocking && read_callback && strlen(read_buffer))
     {
-      read_buffer += data;
-      if (!blocking && read_callback && strlen(read_buffer))
-      {
-	read_callback(id, read_buffer + data);
-	read_buffer = "";
-      }
+      read_callback(id, read_buffer);
+      read_buffer = "";
     }
   } else {
     if (data > 0)
-- 
GitLab