[master] a6419c8 Fix HTC_Reinit() return type
Poul-Henning Kamp
phk at varnish-cache.org
Tue Jul 31 12:09:53 CEST 2012
commit a6419c8abeceb1b7759865c23eb57dbcc46dcded
Author: Poul-Henning Kamp <phk at FreeBSD.org>
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;
More information about the varnish-commit
mailing list