From: Nishi Date: Sun, 27 Oct 2024 23:58:10 +0000 (+0000) Subject: handle X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=86d8b5e48a25d553bd9700f2c27b61ee8a8b3cee;p=tewi.git handle git-svn-id: file:///raid/svn-personal/tewi/trunk@395 8739d7e6-ffea-ec47-b151-bdff447c6205 --- diff --git a/Server/server.c b/Server/server.c index 3f1d548..80bd931 100644 --- a/Server/server.c +++ b/Server/server.c @@ -345,9 +345,9 @@ void _tw_process_page(SSL* ssl, int sock, const char* status, const char* type, if(f != NULL) { char buffer[512]; fread(buffer, size < 512 ? size : 512, 1, f); - if(tw_write(ssl, sock, buffer, size < 512 ? size : 512) < 0) return; + if(tw_write(ssl, sock, buffer, size < 512 ? size : 512) <= 0) return; } else { - if(tw_write(ssl, sock, (unsigned char*)doc + incr, size < 512 ? size : 512) < 0) return; + if(tw_write(ssl, sock, (unsigned char*)doc + incr, size < 512 ? size : 512) <= 0) return; } incr += 512; if(size <= 512) break;