Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-file
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
uplex-varnish
libvmod-file
Commits
606b092f
Commit
606b092f
authored
Dec 16, 2019
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Start the timer after asserting that a new object is uninitialized.
(Not before.) Fixes
#1
parent
440e1dd9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
vmod_file.c
src/vmod_file.c
+8
-8
No files found.
src/vmod_file.c
View file @
606b092f
...
...
@@ -408,14 +408,6 @@ vmod_reader__init(VRT_CTX, struct VPFX(file_reader) **rdrp,
timerspec
.
it_interval
.
tv_nsec
=
(
long
)(
1e9
*
(
ttl
-
timerspec
.
it_interval
.
tv_sec
));
errno
=
0
;
if
(
timer_settime
(
timerid
,
0
,
&
timerspec
,
NULL
)
!=
0
)
{
VFAIL
(
ctx
,
"new %s: cannot start update timer: %s"
,
vcl_name
,
vstrerror
(
errno
));
return
;
}
rdr
->
flags
|=
RDR_TIMER_INIT
;
th
=
init_priv_vcl
(
priv
);
AN
(
th
);
errno
=
0
;
...
...
@@ -432,6 +424,14 @@ vmod_reader__init(VRT_CTX, struct VPFX(file_reader) **rdrp,
AZ
(
rdr
->
info
->
mtime
.
tv_sec
);
AZ
(
rdr
->
info
->
mtime
.
tv_nsec
);
AZ
(
rdr
->
flags
&
(
RDR_INITIALIZED
|
RDR_ERROR
|
RDR_DELETED
));
errno
=
0
;
if
(
timer_settime
(
timerid
,
0
,
&
timerspec
,
NULL
)
!=
0
)
{
VFAIL
(
ctx
,
"new %s: cannot start update timer: %s"
,
vcl_name
,
vstrerror
(
errno
));
return
;
}
rdr
->
flags
|=
RDR_TIMER_INIT
;
do
{
VTIM_sleep
(
INIT_SLEEP_INTERVAL
);
}
while
((
rdr
->
flags
&
(
RDR_INITIALIZED
|
RDR_ERROR
))
==
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