Skip to content
Snippets Groups Projects
Commit 3cbf75f5 authored by Niels Möller's avatar Niels Möller
Browse files

Fixed an ugly ssl_read_callback bug discovered by Rob Young.

Rev: lib/modules/SSL.pmod/sslfile.pike:1.9
parent 4102d06e
No related branches found
No related tags found
No related merge requests found
/* $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) ...@@ -131,14 +131,12 @@ private void ssl_read_callback(mixed id, string s)
if (accept_callback) if (accept_callback)
accept_callback(this_object()); accept_callback(this_object());
} }
if (strlen(data))
read_buffer += data;
if (!blocking && read_callback && strlen(read_buffer))
{ {
read_buffer += data; read_callback(id, read_buffer);
if (!blocking && read_callback && strlen(read_buffer)) read_buffer = "";
{
read_callback(id, read_buffer + data);
read_buffer = "";
}
} }
} else { } else {
if (data > 0) if (data > 0)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment