Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-blobdigest
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
2
Issues
2
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
libvmod-blobdigest
Commits
92dca54a
Unverified
Commit
92dca54a
authored
May 28, 2023
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bring back ERR macros with an additional fail argument
in the next commit, we are going to add the option to not fail
parent
7f4e2abf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
11 deletions
+33
-11
vmod_blobdigest.c
src/vmod_blobdigest.c
+33
-11
No files found.
src/vmod_blobdigest.c
View file @
92dca54a
...
...
@@ -41,17 +41,39 @@
#include "byte_order.h"
#define FAIL(ctx, msg) \
VRT_fail((ctx), "vmod blobdigest error: " msg)
#define VFAIL(ctx, fmt, ...) \
VRT_fail((ctx), "vmod blobdigest error: " fmt, __VA_ARGS__)
#define VFAILNOMEM(ctx, fmt, ...) \
VFAIL((ctx), fmt ", out of space", __VA_ARGS__)
#define FAILNOMEM(ctx, msg) \
FAIL((ctx), msg ", out of space")
#define ERR(fail, ctx, msg) do { \
if (fail) \
VRT_fail((ctx), "vmod blobdigest error: " msg); \
else \
VSLbs((ctx)->vsl, SLT_Error, TOSTRAND(msg)); \
} while (0)
#define VERR(fail, ctx, fmt, ...) do { \
if (fail) \
VRT_fail((ctx), "vmod blobdigest error: " fmt, \
__VA_ARGS__); \
else \
VSLb((ctx)->vsl, SLT_Error, \
"vmod blobdigest error: " fmt, __VA_ARGS__); \
} while (0)
#define VERRNOMEM(fail, ctx, fmt, ...) \
VERR(fail, (ctx), fmt ", out of space", __VA_ARGS__)
#define ERRNOMEM(fail, ctx, msg) \
ERR(fail, (ctx), msg ", out of space")
#define FAIL(ctx, msg) \
ERR(1, ctx, msg)
#define VFAIL(ctx, fmt, ...) \
VERR(1, ctx, fmt, __VA_ARGS__)
#define VFAILNOMEM(ctx, fmt, ...) \
VERRNOMEM(1, ctx, fmt, __VA_ARGS__)
#define FAILNOMEM(ctx, msg) \
ERRNOMEM(1, ctx, msg)
#define INIT_FINI(ctx) (((ctx)->method & (VCL_MET_INIT | VCL_MET_FINI)) != 0)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment