Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-re
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
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
Nils Goroll
libvmod-re
Commits
1a1b64b0
Commit
1a1b64b0
authored
Mar 07, 2019
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use VRT_fail() for errors in vcl_init, as now required by Varnish.
parent
bf1afdd3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
15 deletions
+8
-15
vmod_re.c
src/vmod_re.c
+8
-15
No files found.
src/vmod_re.c
View file @
1a1b64b0
...
...
@@ -76,20 +76,13 @@ errmsg(VRT_CTX, const char *fmt, ...)
{
va_list
args
;
AZ
(
ctx
->
method
&
VCL_MET_TASK_H
);
va_start
(
args
,
fmt
);
if
(
ctx
->
vsl
)
VSLbv
(
ctx
->
vsl
,
SLT_VCL_Error
,
fmt
,
args
);
else
VSLv
(
SLT_VCL_Error
,
0
,
fmt
,
args
);
va_end
(
args
);
if
(
ctx
->
method
==
VCL_MET_INIT
)
{
AN
(
ctx
->
msg
);
va_start
(
args
,
fmt
);
VSB_vprintf
(
ctx
->
msg
,
fmt
,
args
);
va_end
(
args
);
VRT_handling
(
ctx
,
VCL_RET_FAIL
);
}
}
VCL_VOID
...
...
@@ -108,19 +101,19 @@ vmod_regex__init(VRT_CTX, struct vmod_re_regex **rep, const char *vcl_name,
AN
(
pattern
);
if
(
limit
<
1
)
{
errmsg
(
ctx
,
"vmod re: invalid limit %d in %s constructor"
,
VRT_fail
(
ctx
,
"vmod re: invalid limit %d in %s constructor"
,
limit
,
vcl_name
);
return
;
}
if
(
limit_recursion
<
1
)
{
errmsg
(
ctx
,
"vmod re: invalid limit_recursion %d "
VRT_fail
(
ctx
,
"vmod re: invalid limit_recursion %d "
"in %s constructor"
,
limit_recursion
,
vcl_name
);
return
;
}
if
((
vre
=
VRE_compile
(
pattern
,
0
,
&
error
,
&
erroffset
))
==
NULL
)
{
errmsg
(
ctx
,
"vmod re: error compiling regex
\"
%s
\"
in %s "
VRT_fail
(
ctx
,
"vmod re: error compiling regex
\"
%s
\"
in %s "
"constructor: %s (at offset %d)"
,
pattern
,
vcl_name
,
error
,
erroffset
);
return
;
...
...
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