]> err.no Git - varnish/commitdiff
Cleanup
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Fri, 21 Jul 2006 12:18:01 +0000 (12:18 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Fri, 21 Jul 2006 12:18:01 +0000 (12:18 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@538 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/cache.h
varnish-cache/bin/varnishd/cache_expire.c
varnish-cache/bin/varnishd/cache_fetch.c
varnish-cache/bin/varnishd/cache_http.c
varnish-cache/bin/varnishd/cache_pool.c
varnish-cache/bin/varnishd/cache_session.c
varnish-cache/bin/varnishd/flint.lnt

index 23ad992d55680984983b1aec3c980936efcf9791..eb2394b21a412a5c5b5ef1f556ea02e3a2dff057 100644 (file)
@@ -303,7 +303,6 @@ void http_Write(struct worker *w, struct http *hp, int resp);
 void http_CopyReq(int fd, struct http *to, struct http *fm);
 void http_CopyResp(int fd, struct http *to, struct http *fm);
 void http_FilterHeader(int fd, struct http *to, struct http *fm, unsigned how);
-void http_CopyHeader(int fd, struct http *to, struct http *fm, unsigned n);
 void http_PrintfHeader(int fd, struct http *to, const char *fmt, ...);
 int http_IsHdr(struct http_hdr *hh, char *hdr);
 void http_Setup(struct http *ht, void *space, unsigned len);
@@ -316,13 +315,7 @@ int http_Read(struct http *hp, int fd, void *b, unsigned len);
 void http_RecvHead(struct http *hp, int fd, struct event_base *eb, http_callback_f *func, void *arg);
 int http_DissectRequest(struct http *sp, int fd);
 int http_DissectResponse(struct http *sp, int fd);
-enum http_build {
-       Build_Pipe,
-       Build_Pass,
-       Build_Fetch,
-       Build_Reply
-};
-void http_BuildSbuf(int fd, enum http_build mode, struct sbuf *sb, struct http *hp);
+
 #define HTTPH(a, b, c, d, e, f, g) extern char b[];
 #include "http_headers.h"
 #undef HTTPH
@@ -339,7 +332,7 @@ void WRK_Init(void);
 void WRK_QueueSession(struct sess *sp);
 void WRK_Reset(struct worker *w, int *fd);
 int WRK_Flush(struct worker *w);
-void WRK_Write(struct worker *w, const void *ptr, size_t len);
+void WRK_Write(struct worker *w, const void *ptr, int len);
 void WRK_WriteH(struct worker *w, struct http_hdr *hh, const char *suf);
 
 /* cache_session.c [SES] */
@@ -347,7 +340,6 @@ void SES_Init(void);
 struct sess *SES_New(struct sockaddr *addr, unsigned len);
 void SES_Delete(struct sess *sp);
 void SES_RefSrcAddr(struct sess *sp);
-void SES_RelSrcAddr(struct sess *sp);
 void SES_ChargeBytes(struct sess *sp, uint64_t bytes);
 
 /* cache_shmlog.c */
index d76b5971305958f0188359a076ba41c07ffcc8c4..8ec22f4963d7b74f9cbda598c23778d3033406f5 100644 (file)
@@ -110,6 +110,7 @@ exp_prefetch(void *arg)
        (void)arg;
 
        sp = SES_New(NULL, 0);
+       assert(sp != NULL);
        while (1) {
                t = time(NULL);
                AZ(pthread_mutex_lock(&exp_mtx));
index 80b0fc19c9d07c4aafe9b6c27649e95273bac5f0..cb84c1b47ca6102be611769210ea549dbf28417b 100644 (file)
@@ -209,7 +209,6 @@ FetchBody(struct sess *sp)
 {
        int cls;
        struct vbe_conn *vc;
-       struct worker *w;
        char *b;
        int body = 1;           /* XXX */
 
@@ -217,7 +216,6 @@ FetchBody(struct sess *sp)
        CHECK_OBJ_NOTNULL(sp->wrk, WORKER_MAGIC);
        CHECK_OBJ_NOTNULL(sp->obj, OBJECT_MAGIC);
        assert(sp->obj->busy != 0);
-       w = sp->wrk;
 
        vc = sp->vbc;
 
index 864650f3dddfe448ded933759ca985df7eecfa6c..2eaf293fdce098fc378c127e6028b991c7711ad0 100644 (file)
@@ -551,8 +551,8 @@ http_CopyResp(int fd, struct http *to, struct http *fm)
        http_copyh(fd, to, fm, HTTP_HDR_RESPONSE, SLT_Response);
 }
 
-void
-http_CopyHeader(int fd, struct http *to, struct http *fm, unsigned n)
+static void
+http_copyheader(int fd, struct http *to, struct http *fm, unsigned n)
 {
 
        CHECK_OBJ_NOTNULL(fm, HTTP_MAGIC);
@@ -584,7 +584,7 @@ http_FilterHeader(int fd, struct http *to, struct http *fm, unsigned how)
                        continue;
 #include "http_headers.h"
 #undef HTTPH
-               http_CopyHeader(fd, to, fm, u);
+               http_copyheader(fd, to, fm, u);
        }
 }
 
@@ -644,7 +644,7 @@ http_Write(struct worker *w, struct http *hp, int resp)
 void
 HTTP_Init(void)
 {
-#define HTTPH(a, b, c, d, e, f, g) b[0] = strlen(b + 1);
+#define HTTPH(a, b, c, d, e, f, g) b[0] = (char)strlen(b + 1);
 #include "http_headers.h"
 #undef HTTPH
 }
index 7a0490c2b6279efcc6a8eaac6768c126167b08f3..cd7c3e882857b548daae4bf4d7752a1f3482277d 100644 (file)
@@ -75,7 +75,7 @@ WRK_WriteH(struct worker *w, struct http_hdr *hh, const char *suf)
 }
 
 void
-WRK_Write(struct worker *w, const void *ptr, size_t len)
+WRK_Write(struct worker *w, const void *ptr, int len)
 {
 
        CHECK_OBJ_NOTNULL(w, WORKER_MAGIC);
index 52943633e0e921c1389d6e7f9cd729d445f8e980..f2ade62b1e2fb3d685e8ba421ca531f3e41beee6 100644 (file)
@@ -141,8 +141,8 @@ SES_ChargeBytes(struct sess *sp, uint64_t bytes)
            sa->addr, (intmax_t)(bytes), now - sa->first);
 }
 
-void
-SES_RelSrcAddr(struct sess *sp)
+static void
+ses_relsrcaddr(struct sess *sp)
 {
 
        if (sp->srcaddr == NULL) {
@@ -188,7 +188,7 @@ SES_Delete(struct sess *sp)
 
        CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
        VSL_stats->n_sess--;
-       SES_RelSrcAddr(sp);
+       ses_relsrcaddr(sp);
        CHECK_OBJ_NOTNULL(sp->mem, SESSMEM_MAGIC);
        free(sp->mem);
 }
index 45285ead17d85d751f9c53578edbdcfadee87d98..9ac3c66063174974b84af4349735f1b18e76c15c 100644 (file)
@@ -28,6 +28,8 @@
 
 // cache_center.c
 -efunc(525, CNT_Session)       // Negative indentation from line
+-efunc(525, http_FilterHeader) // Negative indentation from line
+-efunc(539, http_FilterHeader) // Positive indentation from line
 
 // cache_vcl.c
 -efunc(525, vcl_handlingname)  // Negative indentation from line