commit a2c85e397e0a1bfba0478cd7c2e180ee1fc7d589
Author: Nils Goroll <nils.goroll@uplex.de>
Date: Sat Jan 23 09:38:26 2021 +0100
Polish 50780f307600fe14c367892bbd3e9c90535b85a2
Do not overwrite an already latched errno.
Note that it does not make any difference at the moment because we only
ever use ENOMEM
Ref #3502
diff --git a/bin/varnishd/cache/cache_esi_fetch.c b/bin/varnishd/cache/cache_esi_fetch.c
index 508d46e26..0624fefe1 100644
--- a/bin/varnishd/cache/cache_esi_fetch.c
+++ b/bin/varnishd/cache/cache_esi_fetch.c
@@ -120,10 +120,12 @@ vfp_esi_end(struct vfp_ctx *vc, struct vef_priv *vef,
CHECK_OBJ_NOTNULL(vc, VFP_CTX_MAGIC);
CHECK_OBJ_NOTNULL(vef, VEF_MAGIC);
- if (retval == VFP_ERROR)
- vef->error = errno ? errno : EINVAL;
- else
+ if (retval == VFP_ERROR) {
+ if (vef->error == 0)
+ vef->error = errno ? errno : EINVAL;
+ } else {
assert(retval == VFP_END);
+ }
vsb = VEP_Finish(vef->vep);
_______________________________________________
varnish-commit mailing list
varnish-commit@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit
Author: Nils Goroll <nils.goroll@uplex.de>
Date: Sat Jan 23 09:38:26 2021 +0100
Polish 50780f307600fe14c367892bbd3e9c90535b85a2
Do not overwrite an already latched errno.
Note that it does not make any difference at the moment because we only
ever use ENOMEM
Ref #3502
diff --git a/bin/varnishd/cache/cache_esi_fetch.c b/bin/varnishd/cache/cache_esi_fetch.c
index 508d46e26..0624fefe1 100644
--- a/bin/varnishd/cache/cache_esi_fetch.c
+++ b/bin/varnishd/cache/cache_esi_fetch.c
@@ -120,10 +120,12 @@ vfp_esi_end(struct vfp_ctx *vc, struct vef_priv *vef,
CHECK_OBJ_NOTNULL(vc, VFP_CTX_MAGIC);
CHECK_OBJ_NOTNULL(vef, VEF_MAGIC);
- if (retval == VFP_ERROR)
- vef->error = errno ? errno : EINVAL;
- else
+ if (retval == VFP_ERROR) {
+ if (vef->error == 0)
+ vef->error = errno ? errno : EINVAL;
+ } else {
assert(retval == VFP_END);
+ }
vsb = VEP_Finish(vef->vep);
_______________________________________________
varnish-commit mailing list
varnish-commit@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit