Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

Fixes #1069
  • Loading branch information...
commit 22bc7fc6c47558e6e231ba922f183c601b79c620 1 parent 444e642
@bsdphk bsdphk authored Tollef Fog Heen committed
Showing with 6 additions and 8 deletions.
  1. +6 −8 bin/varnishd/mgt_vcc.c
View
14 bin/varnishd/mgt_vcc.c
@@ -390,18 +390,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);
}
/*--------------------------------------------------------------------*/
Please sign in to comment.
Something went wrong with that request. Please try again.