Commit f5c6da25 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Cleanup


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@538 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent c30e3808
......@@ -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 */
......
......@@ -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));
......
......@@ -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;
......
......@@ -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
}
......@@ -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);
......
......@@ -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);
}
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment