]> err.no Git - varnish/commitdiff
Remove a spurious debugging message.
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Fri, 15 Feb 2008 12:56:01 +0000 (12:56 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Fri, 15 Feb 2008 12:56:01 +0000 (12:56 +0000)
Account for the HTTP bits we do know about and handle.
Ignore return value from shutdown(2)

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2482 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/cache_pipe.c

index c5d02033636a798a85cbc941a47bc59bf44631af..9438a00737863323638e0ea5650a556cdc493fb3 100644 (file)
@@ -57,10 +57,8 @@ rdf(int fd0, int fd1)
                j = write(fd1, p, i);
                if (j <= 0)
                        return (1);
-               if (i != j) {
-                       printf("flunk %d %d\n", i, j);
-                       usleep(100000);         /* XXX hack */
-               }
+               if (i != j)
+                       (void)usleep(100000);           /* XXX hack */
        }
        return (0);
 }
@@ -85,10 +83,11 @@ PipeSession(struct sess *sp)
                return;
 
        WRK_Reset(w, &vc->fd);
-       http_Write(w, bereq->http, 0);
+       w->acct.hdrbytes += http_Write(w, bereq->http, 0);
 
        if (sp->htc->pipeline.b != NULL)
-               WRK_Write(w, sp->htc->pipeline.b, Tlen(sp->htc->pipeline));
+               w->acct.bodybytes +=
+                   WRK_Write(w, sp->htc->pipeline.b, Tlen(sp->htc->pipeline));
 
        if (WRK_Flush(w)) {
                vca_close_session(sp, "pipe");
@@ -114,25 +113,25 @@ PipeSession(struct sess *sp)
                if (i < 1) 
                        break;
                if (fds[0].revents && rdf(vc->fd, sp->fd)) {
-                       shutdown(vc->fd, SHUT_RD);
-                       shutdown(sp->fd, SHUT_WR);
+                       (void)shutdown(vc->fd, SHUT_RD);
+                       (void)shutdown(sp->fd, SHUT_WR);
                        fds[0].events = 0;
                        fds[0].fd = -1;
                }
                if (fds[1].revents && rdf(sp->fd, vc->fd)) {
-                       shutdown(sp->fd, SHUT_RD);
-                       shutdown(vc->fd, SHUT_WR);
+                       (void)shutdown(sp->fd, SHUT_RD);
+                       (void)shutdown(vc->fd, SHUT_WR);
                        fds[1].events = 0;
                        fds[1].fd = -1;
                }
        }
        if (fds[0].fd >= 0) {
-               shutdown(vc->fd, SHUT_RD);
-               shutdown(sp->fd, SHUT_WR);
+               (void)shutdown(vc->fd, SHUT_RD);
+               (void)shutdown(sp->fd, SHUT_WR);
        }
        if (fds[1].fd >= 0) {
-               shutdown(sp->fd, SHUT_RD);
-               shutdown(vc->fd, SHUT_WR);
+               (void)shutdown(sp->fd, SHUT_RD);
+               (void)shutdown(vc->fd, SHUT_WR);
        }
        vca_close_session(sp, "pipe");
        VBE_ClosedFd(sp->wrk, vc);