Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Varnish: Commits

[master] 8bf6c6d Also reflect the VCC exit code through if -C is specified.

 

 

Varnish commits RSS feed   Index | Next | Previous | View Threaded


phk at varnish-cache

Apr 23, 2012, 9:17 AM

Post #1 of 1 (40 views)
Permalink
[master] 8bf6c6d Also reflect the VCC exit code through if -C is specified.

commit 8bf6c6d2891b50b04af463791fc380c359b1d02c
Author: Poul-Henning Kamp <phk [at] FreeBSD>
Date: Mon Apr 23 16:17:14 2012 +0000

Also reflect the VCC exit code through if -C is specified.

Fixes #1069

diff --git a/bin/varnishd/mgt/mgt_vcc.c b/bin/varnishd/mgt/mgt_vcc.c
index 12433ad..98dc4c4 100644
--- a/bin/varnishd/mgt/mgt_vcc.c
+++ b/bin/varnishd/mgt/mgt_vcc.c
@@ -394,18 +394,16 @@ mgt_vcc_default(const char *b_arg, const char *f_arg, char *vcl, int C_flag)
if (VSB_len(sb) > 0)
fprintf(stderr, "%s", VSB_data(sb));
VSB_delete(sb);
- if (C_flag) {
- if (vf != NULL)
- AZ(unlink(vf));
- return (0);
- }
+ if (C_flag && vf != NULL)
+ AZ(unlink(vf));
if (vf == NULL) {
fprintf(stderr, "\nVCL compilation failed\n");
return (1);
+ } else {
+ vp = mgt_vcc_add(buf, vf);
+ vp->active = 1;
+ return (0);
}
- vp = mgt_vcc_add(buf, vf);
- vp->active = 1;
- return (0);
}

/*--------------------------------------------------------------------*/

_______________________________________________
varnish-commit mailing list
varnish-commit [at] varnish-cache
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit

Varnish commits RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.