diff options
| author | Sascha Schumann <sas@php.net> | 2001-01-15 14:48:14 +0000 |
|---|---|---|
| committer | Sascha Schumann <sas@php.net> | 2001-01-15 14:48:14 +0000 |
| commit | f6eae19147469aeda1fdcd5706e213230257ace8 (patch) | |
| tree | 1ae0e253ae6b4565741ef87029802fedc70da032 /sapi/aolserver/aolserver.c | |
| parent | 57d200c21b472c34427c0b1ddc3a7425d7f60f5a (diff) | |
| download | php-git-f6eae19147469aeda1fdcd5706e213230257ace8.tar.gz | |
Try harder to push data through the wire.
I just learned that the AOLserver module will be used for a 100k users
webmail service. Wheee!
Diffstat (limited to 'sapi/aolserver/aolserver.c')
| -rw-r--r-- | sapi/aolserver/aolserver.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/sapi/aolserver/aolserver.c b/sapi/aolserver/aolserver.c index aabfe5a9e1..8735b82871 100644 --- a/sapi/aolserver/aolserver.c +++ b/sapi/aolserver/aolserver.c @@ -93,15 +93,22 @@ static void php_ns_config(php_ns_context *ctx, char global); static int php_ns_sapi_ub_write(const char *str, uint str_length) { - int sent_bytes; + int n; + uint sent = 0; NSLS_FETCH(); - sent_bytes = Ns_ConnWrite(NSG(conn), (void *) str, str_length); + while (str_length > 0) { + n = Ns_ConnWrite(NSG(conn), (void *) str, str_length); - if (sent_bytes != str_length) - php_handle_aborted_connection(); + if (n == -1) + php_handle_aborted_connection(); + + str += n; + sent += n; + str_length -= n; + } - return sent_bytes; + return sent; } /* |
