]> git.kaiwu.me - nginx.git/commitdiff
Reduced difference between the send chain functions.
authorValentin Bartenev <vbart@nginx.com>
Wed, 13 Aug 2014 11:11:45 +0000 (15:11 +0400)
committerValentin Bartenev <vbart@nginx.com>
Wed, 13 Aug 2014 11:11:45 +0000 (15:11 +0400)
No functional changes.  This follows the change from ad137a80919f.

src/os/unix/ngx_writev_chain.c
src/os/win32/ngx_wsasend_chain.c

index 8e502169603e07507f3b316552a1c5865d46e394..f67c3a3c9501c30a97dab4fa2a66adb054786300 100644 (file)
@@ -138,7 +138,7 @@ ngx_writev_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
 
         c->sent += sent;
 
-        cl = ngx_handle_sent_chain(in, sent);
+        in = ngx_handle_sent_chain(in, sent);
 
         if (eintr) {
             continue;
@@ -146,13 +146,11 @@ ngx_writev_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
 
         if (send - prev_send != sent) {
             wev->ready = 0;
-            return cl;
+            return in;
         }
 
-        if (send >= limit || cl == NULL) {
-            return cl;
+        if (send >= limit || in == NULL) {
+            return in;
         }
-
-        in = cl;
     }
 }
index b559f9fe1943d732421dfc95755e7443d7117c6b..e28e1ee315d41d8954c02858f997ebcfa52807a0 100644 (file)
@@ -113,18 +113,16 @@ ngx_wsasend_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
 
         c->sent += sent;
 
-        cl = ngx_handle_sent_chain(in, sent);
+        in = ngx_handle_sent_chain(in, sent);
 
         if (send - prev_send != sent) {
             wev->ready = 0;
-            return cl;
+            return in;
         }
 
-        if (send >= limit || cl == NULL) {
-            return cl;
+        if (send >= limit || in == NULL) {
+            return in;
         }
-
-        in = cl;
     }
 }
 
@@ -280,14 +278,14 @@ ngx_overlapped_wsasend_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
 
     c->sent += sent;
 
-    cl = ngx_handle_sent_chain(in, sent);
+    in = ngx_handle_sent_chain(in, sent);
 
-    if (cl) {
+    if (in) {
         wev->ready = 0;
 
     } else {
         wev->ready = 1;
     }
 
-    return cl;
+    return in;
 }