[master] bbf9e25 Change calling convenction of WAIT_Enter() to be sess agnostic
Poul-Henning Kamp
phk at FreeBSD.org
Mon Jan 12 13:36:41 CET 2015
commit bbf9e25b20a33a344b2984cba7346c3edee8c213
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Mon Jan 12 12:36:26 2015 +0000
Change calling convenction of WAIT_Enter() to be sess agnostic
diff --git a/bin/varnishd/cache/cache_session.c b/bin/varnishd/cache/cache_session.c
index e0fec6e..4d46e32 100644
--- a/bin/varnishd/cache/cache_session.c
+++ b/bin/varnishd/cache/cache_session.c
@@ -288,7 +288,7 @@ SES_Wait(struct sess *sp)
CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
pp = sp->sesspool;
CHECK_OBJ_NOTNULL(pp, SESSPOOL_MAGIC);
- if (WAIT_Enter(pp->http1_waiter, sp)) {
+ if (WAIT_Enter(pp->http1_waiter, sp, sp->fd)) {
VSC_C_main->sess_pipe_overflow++;
SES_Delete(sp, SC_SESS_PIPE_OVERFLOW, NAN);
}
diff --git a/bin/varnishd/waiter/cache_waiter.c b/bin/varnishd/waiter/cache_waiter.c
index af01124..1313766 100644
--- a/bin/varnishd/waiter/cache_waiter.c
+++ b/bin/varnishd/waiter/cache_waiter.c
@@ -74,11 +74,13 @@ WAIT_Init(waiter_handle_f *func)
}
int
-WAIT_Enter(const struct waiter *w, struct sess *sp)
+WAIT_Enter(const struct waiter *w, void *ptr, int fd)
{
+ struct sess *sp;
CHECK_OBJ_NOTNULL(w, WAITER_MAGIC);
- CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
+ CAST_OBJ_NOTNULL(sp, ptr, SESS_MAGIC);
+ assert(fd >= 0);
assert(sp->fd >= 0);
return (w->impl->pass(w->priv, sp));
diff --git a/bin/varnishd/waiter/waiter.h b/bin/varnishd/waiter/waiter.h
index 902356d..7d6cbac 100644
--- a/bin/varnishd/waiter/waiter.h
+++ b/bin/varnishd/waiter/waiter.h
@@ -50,7 +50,7 @@ struct waiter_impl {
};
/* cache_waiter.c */
-int WAIT_Enter(const struct waiter *, struct sess *sp);
+int WAIT_Enter(const struct waiter *, void *ptr, int fd);
struct waiter *WAIT_Init(waiter_handle_f *);
const char *WAIT_GetName(void);
int WAIT_Write_Session(struct sess *sp, int fd);
More information about the varnish-commit
mailing list