
phk at varnish-cache
Jul 31, 2012, 3:09 AM
Views: 38
Permalink
|
|
[master] a6419c8 Fix HTC_Reinit() return type
|
|
commit a6419c8abeceb1b7759865c23eb57dbcc46dcded Author: Poul-Henning Kamp <phk [at] FreeBSD> Date: Tue Jul 31 10:09:41 2012 +0000 Fix HTC_Reinit() return type diff --git a/bin/varnishd/cache/cache.h b/bin/varnishd/cache/cache.h index dfc8f69..56c4e6b 100644 --- a/bin/varnishd/cache/cache.h +++ b/bin/varnishd/cache/cache.h @@ -881,7 +881,7 @@ enum htc_status_e { void HTC_Init(struct http_conn *htc, struct ws *ws, int fd, struct vsl_log *, unsigned maxbytes, unsigned maxhdr); -int HTC_Reinit(struct http_conn *htc); +enum htc_status_e HTC_Reinit(struct http_conn *htc); enum htc_status_e HTC_Rx(struct http_conn *htc); ssize_t HTC_Read(struct http_conn *htc, void *d, size_t len); enum htc_status_e HTC_Complete(struct http_conn *htc); diff --git a/bin/varnishd/cache/cache_center.c b/bin/varnishd/cache/cache_center.c index 64efb5d..4132de9 100644 --- a/bin/varnishd/cache/cache_center.c +++ b/bin/varnishd/cache/cache_center.c @@ -204,7 +204,6 @@ enum cnt_sess_done_ret { static enum cnt_sess_done_ret cnt_sess_done(struct sess *sp, struct worker *wrk, struct req *req) { - int i; CHECK_OBJ_NOTNULL(sp, SESS_MAGIC); CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC); @@ -258,8 +257,7 @@ cnt_sess_done(struct sess *sp, struct worker *wrk, struct req *req) WS_Reset(wrk->aws, NULL); req->vxid = VXID_Get(&wrk->vxid_pool); - i = HTC_Reinit(req->htc); - if (i == 1) { + if (HTC_Reinit(req->htc) == HTC_COMPLETE) { req->t_req = sp->t_idle; wrk->stats.sess_pipeline++; return (SESS_DONE_RET_START); diff --git a/bin/varnishd/cache/cache_httpconn.c b/bin/varnishd/cache/cache_httpconn.c index 211e8a9..6ebb86c 100644 --- a/bin/varnishd/cache/cache_httpconn.c +++ b/bin/varnishd/cache/cache_httpconn.c @@ -75,7 +75,7 @@ HTC_Init(struct http_conn *htc, struct ws *ws, int fd, struct vsl_log *vsl, * the ws somewhere, because WS_Reset only fiddles pointers. */ -int +enum htc_status_e HTC_Reinit(struct http_conn *htc) { unsigned l; _______________________________________________ varnish-commit mailing list varnish-commit [at] varnish-cache https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit
|