void DealWithSession(void *arg);
/* cache_shmlog.c */
+#include "cache_shmlog.h"
+
void VSL_Init(void);
#ifdef SHMLOGHEAD_MAGIC
void VSLR(enum shmlogtag tag, unsigned id, const char *b, const char *e);
assert(__LINE__ == 0); \
} while (0)
#endif
-extern struct varnish_stats *VSL_stats;
/* cache_response.c */
void RES_Error(struct worker *w, struct sess *sp, int error, const char *msg);
/*--------------------------------------------------------------------*/
static void
-vca_tick(int a, short b, void *c)
+vca_tick(int a __unused, short b __unused, void *c __unused)
{
struct sess *sp, *sp2;
time_t t;
}
static void
-pipe_f(int fd, short event, void *arg)
+pipe_f(int fd, short event __unused, void *arg __unused)
{
struct sess *sp;
int i;
}
static void
-accept_f(int fd, short event, void *arg)
+accept_f(int fd, short event __unused, void *arg __unused)
{
socklen_t l;
struct sockaddr addr[2];
}
static void *
-vca_main(void *arg)
+vca_main(void *arg __unused)
{
unsigned u;
struct event *ep;
}
event_base_loop(evb, 0);
-
- return ("FOOBAR");
+ assert(0 == 1);
+ return (NULL);
}
/*--------------------------------------------------------------------*/
*/
static void
-vbe_rdp(int fd, short event, void *arg)
+vbe_rdp(int fd, short event __unused, void *arg __unused)
{
struct vbe_conn *vc;
int i;
- (void)event;
- (void)arg;
-
i = read(fd, &vc, sizeof vc);
assert(i == sizeof vc);
AZ(pthread_mutex_lock(&vbemtx));
*/
static void
-vbe_rdf(int fd, short event, void *arg)
+vbe_rdf(int fd __unused, short event __unused, void *arg)
{
struct vbe_conn *vc;
int j;
- (void)event;
-
vc = arg;
AZ(pthread_mutex_lock(&vbemtx));
if (vc->inuse) {
/* Backend monitoring thread -----------------------------------------*/
static void *
-vbe_main(void *priv)
+vbe_main(void *priv __unused)
{
struct event pev;
- (void)priv;
-
vbe_evb = event_init();
assert(vbe_evb != NULL);
}
void
-cli_func_url_purge(struct cli *cli, char **av, void *priv)
+cli_func_url_purge(struct cli *cli, char **av, void *priv __unused)
{
AddBan(av[2]);
*/
static void *
-exp_hangman(void *arg)
+exp_hangman(void *arg __unused)
{
struct object *o;
time_t t;
*/
static void *
-exp_prefetch(void *arg)
+exp_prefetch(void *arg __unused)
{
struct object *o;
time_t t;
}
assert(sp.handling == VCL_RET_DISCARD);
}
-
- return ("FOOBAR");
}
/*--------------------------------------------------------------------*/
static int
-object_cmp(void *priv, void *a, void *b)
+object_cmp(void *priv __unused, void *a, void *b)
{
struct object *aa, *bb;
}
static void
-object_update(void *priv, void *p, unsigned u)
+object_update(void *priv __unused, void *p, unsigned u)
{
struct object *o = p;
/*--------------------------------------------------------------------*/
static int
-fetch_straight(struct worker *w, struct sess *sp, int fd, struct http *hp, char *b)
+fetch_straight(struct sess *sp, int fd, struct http *hp, char *b)
{
int i;
char *e;
/* XXX: Cleanup. It must be possible somehow :-( */
static int
-fetch_chunked(struct worker *w, struct sess *sp, int fd, struct http *hp)
+fetch_chunked(struct sess *sp, int fd, struct http *hp)
{
int i;
char *b, *q, *e;
#include <errno.h>
static int
-fetch_eof(struct worker *w, struct sess *sp, int fd, struct http *hp)
+fetch_eof(struct sess *sp, int fd, struct http *hp)
{
int i;
char *b, *e;
http_BuildSbuf(sp->fd, Build_Reply, w->sb, hp);
if (body) {
if (http_GetHdr(hp, "Content-Length", &b))
- cls = fetch_straight(w, sp, vc->fd, hp, b);
+ cls = fetch_straight(sp, vc->fd, hp, b);
else if (http_HdrIs(hp, "Transfer-Encoding", "chunked"))
- cls = fetch_chunked(w, sp, vc->fd, hp);
+ cls = fetch_chunked(sp, vc->fd, hp);
else
- cls = fetch_eof(w, sp, vc->fd, hp);
+ cls = fetch_eof(sp, vc->fd, hp);
sbuf_printf(w->sb, "Content-Length: %u\r\n", sp->obj->len);
} else
cls = 0;
#include <errno.h>
static void
-http_read_f(int fd, short event, void *arg)
+http_read_f(int fd, short event __unused, void *arg)
{
struct http *hp = arg;
unsigned l;
struct stevedore *stevedore;
pthread_mutex_t sessmtx;
+struct varnish_stats *VSL_stats;
/*--------------------------------------------------------------------*/
/*--------------------------------------------------------------------*/
static int
-pass_straight(struct worker *w, struct sess *sp, int fd, struct http *hp, char *bi)
+pass_straight(struct sess *sp, int fd, struct http *hp, char *bi)
{
int i;
char *b, *e;
/*--------------------------------------------------------------------*/
static int
-pass_chunked(struct worker *w, struct sess *sp, int fd, struct http *hp)
+pass_chunked(struct sess *sp, int fd, struct http *hp)
{
int i, j;
char *b, *q, *e;
vca_write(sp, sbuf_data(w->sb), sbuf_len(w->sb));
if (http_GetHdr(hp, "Content-Length", &b))
- cls = pass_straight(w, sp, vc->fd, hp, b);
+ cls = pass_straight(sp, vc->fd, hp, b);
else if (http_HdrIs(hp, "Connection", "close"))
- cls = pass_straight(w, sp, vc->fd, hp, NULL);
+ cls = pass_straight(sp, vc->fd, hp, NULL);
else if (http_HdrIs(hp, "Transfer-Encoding", "chunked"))
- cls = pass_chunked(w, sp, vc->fd, hp);
+ cls = pass_chunked(sp, vc->fd, hp);
else {
INCOMPL();
cls = 1;
};
static void
-rdf(int fd, short event, void *arg)
+rdf(int fd, short event __unused, void *arg)
{
int i, j;
struct edir *ep;
#endif
struct varnish_stats *VSL_stats;
-
static struct shmloghead *loghead;
static unsigned char *logstart;
static pthread_mutex_t vsl_mutex;
/* XXX check sanity of loghead */
logstart = (unsigned char *)loghead + loghead->start;
- VSL_stats = &loghead->stats;
AZ(pthread_mutex_init(&vsl_mutex, NULL));
+ VSL_stats = &loghead->stats;
}
/*--------------------------------------------------------------------*/
--- /dev/null
+/*
+ * $Id$
+ */
+
+void VSL_MgtInit(const char *fn, unsigned size);
+extern struct varnish_stats *VSL_stats;
}
void
-cli_func_config_list(struct cli *cli, char **av, void *priv)
+cli_func_config_list(struct cli *cli, char **av __unused, void *priv __unused)
{
struct vcls *vcl;
}
void
-cli_func_config_load(struct cli *cli, char **av, void *priv)
+cli_func_config_load(struct cli *cli, char **av, void *priv __unused)
{
struct vcls *vcl;
}
void
-cli_func_config_unload(struct cli *cli, char **av, void *priv)
+cli_func_config_unload(struct cli *cli, char **av __unused, void *priv __unused)
{
cli_result(cli, CLIS_UNIMPL);
}
void
-cli_func_config_use(struct cli *cli, char **av, void *priv)
+cli_func_config_use(struct cli *cli, char **av, void *priv __unused)
{
struct vcls *vcl;
}
static void
-wrcb(struct bufferevent *bev, void *arg)
+wrcb(struct bufferevent *bev __unused, void *arg)
{
struct cli *cli = arg;
extern struct hash_slinger hsl_slinger;
extern struct hash_slinger hcl_slinger;
-void VSL_MgtInit(const char *fn, unsigned size);
-extern struct varnish_stats *VSL_stats;
+#include "cache_shmlog.h"
*/
static void
-std_rdcb(struct bufferevent *bev, void *arg)
+std_rdcb(struct bufferevent *bev, void *arg __unused)
{
const char *p;
}
static void
-cli_rdcb(struct bufferevent *bev, void *arg)
+cli_rdcb(struct bufferevent *bev, void *arg __unused)
{
const char *p;
char **av;
/*--------------------------------------------------------------------*/
static void
-child_pingpong_ccb(unsigned u, const char *r, void *priv)
+child_pingpong_ccb(unsigned u __unused, const char *r __unused, void *priv __unused)
{
/* XXX: reset keepalive timer */
}
static void
-child_pingpong(int a, short b, void *c)
+child_pingpong(int a __unused, short b __unused, void *c __unused)
{
time_t t;
struct timeval tv;
#include <netdb.h>
#include "heritage.h"
+#include "mgt.h"
#include "libvarnish.h"
static void
}
static void
-m_cli_func_passthrough(struct cli *cli, char **av, void *priv)
+m_cli_func_passthrough(struct cli *cli, char **av, void *priv __unused)
{
(void)av;