summaryrefslogtreecommitdiffhomepage
path: root/src/os/win32/ngx_sendfile.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2002-08-20 14:48:28 +0000
committerIgor Sysoev <igor@sysoev.ru>2002-08-20 14:48:28 +0000
commit2b54238a5f2edcca568c0676a779ef79ba152c91 (patch)
tree2cb7eb660e691eaab2c4f031adf881b7c88bffc9 /src/os/win32/ngx_sendfile.c
parente0af1b89dcd100462a3195534b2f78a838ca85b5 (diff)
downloadnginx-2b54238a5f2edcca568c0676a779ef79ba152c91.tar.gz
nginx-2b54238a5f2edcca568c0676a779ef79ba152c91.tar.bz2
nginx-0.0.1-2002-08-20-18:48:28 import
Diffstat (limited to 'src/os/win32/ngx_sendfile.c')
-rw-r--r--src/os/win32/ngx_sendfile.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/os/win32/ngx_sendfile.c b/src/os/win32/ngx_sendfile.c
index 922a4f1f5..d17df6436 100644
--- a/src/os/win32/ngx_sendfile.c
+++ b/src/os/win32/ngx_sendfile.c
@@ -1,6 +1,7 @@
#include <ngx_config.h>
#include <ngx_types.h>
+#include <ngx_socket.h>
#include <ngx_errno.h>
#include <ngx_log.h>
#include <ngx_sendv.h>
@@ -52,16 +53,22 @@ int ngx_sendfile(ngx_socket_t s,
ptfb = NULL;
}
+#if 0
tfrc = TransmitFile(s, fd, nbytes, 0, &olp, ptfb, 0);
+#else
+ tfrc = TransmitFile(s, fd, nbytes, 0, NULL, ptfb, 0);
+#endif
if (tfrc == 0)
tf_err = ngx_socket_errno;
/* set sent */
+#if 0
rc = WSAGetOverlappedResult(s, &olp, (unsigned long *) sent, 0, NULL);
+#endif
- ngx_log_debug(log, "ngx_sendfile: %d, @%qd %d:%qd" _
- tfrc _ offset _ nbytes _ *sent);
+ ngx_log_debug(log, "ngx_sendfile: %d, @%I64d %I64d:%d" _
+ tfrc _ offset _ *sent _ nbytes);
if (rc == 0) {
err = ngx_socket_errno;
@@ -77,7 +84,8 @@ int ngx_sendfile(ngx_socket_t s,
}
ngx_log_error(NGX_LOG_INFO, log, tf_err,
- "ngx_sendfile: TransmitFile sent only %qd bytes", *sent);
+ "ngx_sendfile: TransmitFile sent only %I64d bytes",
+ *sent);
}
if (rc == 0)