r538 - trunk/varnish-cache/bin/varnishd
phk at projects.linpro.no
phk at projects.linpro.no
Fri Jul 21 14:18:02 CEST 2006
Author: phk
Date: 2006-07-21 14:18:01 +0200 (Fri, 21 Jul 2006)
New Revision: 538
Modified:
trunk/varnish-cache/bin/varnishd/cache.h
trunk/varnish-cache/bin/varnishd/cache_expire.c
trunk/varnish-cache/bin/varnishd/cache_fetch.c
trunk/varnish-cache/bin/varnishd/cache_http.c
trunk/varnish-cache/bin/varnishd/cache_pool.c
trunk/varnish-cache/bin/varnishd/cache_session.c
trunk/varnish-cache/bin/varnishd/flint.lnt
Log:
Cleanup
Modified: trunk/varnish-cache/bin/varnishd/cache.h
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache.h 2006-07-21 12:08:57 UTC (rev 537)
+++ trunk/varnish-cache/bin/varnishd/cache.h 2006-07-21 12:18:01 UTC (rev 538)
@@ -303,7 +303,6 @@
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 @@
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_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 @@
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 */
Modified: trunk/varnish-cache/bin/varnishd/cache_expire.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_expire.c 2006-07-21 12:08:57 UTC (rev 537)
+++ trunk/varnish-cache/bin/varnishd/cache_expire.c 2006-07-21 12:18:01 UTC (rev 538)
@@ -110,6 +110,7 @@
(void)arg;
sp = SES_New(NULL, 0);
+ assert(sp != NULL);
while (1) {
t = time(NULL);
AZ(pthread_mutex_lock(&exp_mtx));
Modified: trunk/varnish-cache/bin/varnishd/cache_fetch.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_fetch.c 2006-07-21 12:08:57 UTC (rev 537)
+++ trunk/varnish-cache/bin/varnishd/cache_fetch.c 2006-07-21 12:18:01 UTC (rev 538)
@@ -209,7 +209,6 @@
{
int cls;
struct vbe_conn *vc;
- struct worker *w;
char *b;
int body = 1; /* XXX */
@@ -217,7 +216,6 @@
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;
Modified: trunk/varnish-cache/bin/varnishd/cache_http.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_http.c 2006-07-21 12:08:57 UTC (rev 537)
+++ trunk/varnish-cache/bin/varnishd/cache_http.c 2006-07-21 12:18:01 UTC (rev 538)
@@ -551,8 +551,8 @@
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 @@
continue;
#include "http_headers.h"
#undef HTTPH
- http_CopyHeader(fd, to, fm, u);
+ http_copyheader(fd, to, fm, u);
}
}
@@ -644,7 +644,7 @@
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
}
Modified: trunk/varnish-cache/bin/varnishd/cache_pool.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-07-21 12:08:57 UTC (rev 537)
+++ trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-07-21 12:18:01 UTC (rev 538)
@@ -75,7 +75,7 @@
}
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);
Modified: trunk/varnish-cache/bin/varnishd/cache_session.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_session.c 2006-07-21 12:08:57 UTC (rev 537)
+++ trunk/varnish-cache/bin/varnishd/cache_session.c 2006-07-21 12:18:01 UTC (rev 538)
@@ -141,8 +141,8 @@
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 @@
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);
}
Modified: trunk/varnish-cache/bin/varnishd/flint.lnt
===================================================================
--- trunk/varnish-cache/bin/varnishd/flint.lnt 2006-07-21 12:08:57 UTC (rev 537)
+++ trunk/varnish-cache/bin/varnishd/flint.lnt 2006-07-21 12:18:01 UTC (rev 538)
@@ -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
More information about the varnish-commit
mailing list