/* Storage -----------------------------------------------------------*/
struct sess;
-typedef void sesscb_f(struct sess *sp);
#define VCA_ADDRBUFSIZE 32
TAILQ_ENTRY(sess) list;
- sesscb_f *sesscb;
-
struct backend *backend;
struct object *obj;
struct VCL_conf *vcl;
struct backend {
const char *hostname;
const char *portname;
- struct addrinfo *addr;
unsigned ip;
+#if 0
+ struct addrinfo *addr;
double responsetime;
double timeout;
double bandwidth;
int down;
+#endif
/* internal stuff */
struct vbe *vbe;
/* cache_backend.c */
void VBE_Init(void);
int VBE_GetFd(struct backend *bp, void **ptr);
-void VBE_Pass(struct sess *sp);
void VBE_ClosedFd(void *ptr);
void VBE_RecycleFd(void *ptr);
* be a good thing in that case.
*/
-void
+static void
connect_to_backend(struct vbe_conn *vc, struct backend *bp)
{
struct addrinfo *res, *res0, hint;
i = bp - q;
if (i == 0) {
} else if (v > i) {
+ assert(i > 0);
memcpy(p, q, i);
p += i;
st->len += i;
timer_keepalive(int a, short b, void *c)
{
- printf("%s(%d, %d, %p)\n", __func__, a, b, c);
+ printf("%s(%d, %d, %p)\n", __func__, a, (int)b, c);
printf("Heeellloooo ? Ohh bother...\n");
exit (1);
}
void
PipeSession(struct worker *w, struct sess *sp)
{
- int fd, i, j;
+ int fd, i;
void *fd_token;
struct edir e1, e2;
i = write(fd, sbuf_data(w->sb), sbuf_len(w->sb));
assert(i == sbuf_len(w->sb));
assert(__LINE__ == 0);
- j = 0;
#if 0
+ { int j;
+ j = 0;
i = sp->rcv_len - sp->rcv_ptr;
if (i > 0) {
j = write(sp->fd, sp->rcv + sp->rcv_ptr, i);
assert(j == i);
}
+ }
#endif
e1.fd = fd;
void
VSLR(enum shmlogtag tag, unsigned id, const char *b, const char *e)
{
- va_list ap;
unsigned char *p, *q;
assert(b != NULL);
loghead->ptr = (p + 4 + (e - b)) - logstart;
/* XXX: Unlock */
-
- va_end(ap);
}
static void
excb(struct bufferevent *bev, short what, void *arg)
{
- printf("%s(%p, %d, %p)\n", __func__, (void*)bev, what, arg);
+ printf("%s(%p, %d, %p)\n", __func__, (void*)bev, (int)what, arg);
}
struct cli *
-printf_code( H, void *, unsigned)
-printf_code( ju, long long unsigned)
+-printf_code( jx, long long unsigned)
-e763 // Redundant declaration for symbol '...' previously declared
struct smf_sc {
char *filename;
int fd;
- int pagesize;
+ unsigned pagesize;
uintmax_t filesize;
struct smfhead order;
struct smfhead free;
{
struct smf *smf;
- smf = s->priv;
+ smf = (struct smf *)(s->priv);
free_smf(smf);
}
* Generic passthrough for CLI functions
*/
-void
+static void
cli_passthrough_cb(unsigned u, const char *r, void *priv)
{
struct cli *cli = priv;
const char *p, *q;
struct stevedore *stp;
- q = p = strchr(sflag, ',');
+ p = strchr(sflag, ',');
if (p == NULL)
q = p = strchr(sflag, '\0');
else
- q++;
+ q = p + 1;
+ assert(p != NULL);
+ assert(q != NULL);
if (!cmp_storage(&sma_stevedore, sflag, p)) {
stp = &sma_stevedore;
} else if (!cmp_storage(&smf_stevedore, sflag, p)) {