Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
trackrdrd
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
trackrdrd
Commits
21f82cdb
Commit
21f82cdb
authored
Sep 08, 2017
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update for changes in the VSM/VSL API since Varnish 5.2.
parent
72b252ea
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
16 deletions
+13
-16
configure.ac
configure.ac
+2
-2
child.c
src/child.c
+11
-14
No files found.
configure.ac
View file @
21f82cdb
...
...
@@ -45,9 +45,9 @@ AM_CONDITIONAL(HAVE_RST2MAN, [test "x$RST2MAN" != "xno"])
# Check for pkg-config
PKG_PROG_PKG_CONFIG
PKG_CHECK_MODULES([VARNISH], [varnishapi
>= 5.1.0
],
PKG_CHECK_MODULES([VARNISH], [varnishapi],
[ac_varnish_pkgdatadir=`$PKG_CONFIG --variable=pkgdatadir varnishapi`],
[AC_MSG_ERROR([Varnish
5.1.0
or later is required])])
[AC_MSG_ERROR([Varnish
trunk or 5.2
or later is required])])
if test "x$ac_varnish_pkgdatadir" = x; then
AC_MSG_ERROR([couldn't get Varnish data dir from pkg-config])
fi
...
...
src/child.c
View file @
21f82cdb
...
...
@@ -626,10 +626,11 @@ CHILD_Main(int readconfig)
void
*
mqh
;
struct
VSL_data
*
vsl
;
struct
VSLQ
*
vslq
;
struct
VSM_data
*
vsm
=
NULL
;
struct
vsm
*
vsm
=
NULL
;
struct
VSL_cursor
*
cursor
;
unsigned
long
last_seen
=
0
;
double
last_t
;
char
*
vsm_name
=
NULL
;
MON_StatsInit
();
debug
=
(
LOG_GetLevel
()
==
LOG_DEBUG
);
...
...
@@ -722,21 +723,18 @@ CHILD_Main(int readconfig)
vsm
=
VSM_New
();
AN
(
vsm
);
if
(
!
EMPTY
(
config
.
varnish_name
)
&&
VSM_
n_Arg
(
vsm
,
config
.
varnish_name
)
<=
0
)
{
&&
VSM_
Arg
(
vsm
,
'n'
,
config
.
varnish_name
)
<=
0
)
{
LOG_Log
(
LOG_CRIT
,
"-n %s: %s
\n
"
,
config
.
varnish_name
,
VSM_Error
(
vsm
));
exit
(
EXIT_FAILURE
);
}
else
if
(
!
EMPTY
(
config
.
vsmfile
)
&&
VSM_N_Arg
(
vsm
,
config
.
vsmfile
)
<=
0
)
{
LOG_Log
(
LOG_CRIT
,
"-N %s: %s
\n
"
,
config
.
vsmfile
,
VSM_Error
(
vsm
));
exit
(
EXIT_FAILURE
);
}
if
(
VSM_Open
(
vsm
)
<
0
)
{
LOG_Log
(
LOG_CRIT
,
"Cannot attach to shared memory for instance %s: "
"%s"
,
VSM_Name
(
vsm
),
VSM_Error
(
vsm
));
if
(
VSM_Attach
(
vsm
,
-
1
)
<
0
)
{
LOG_Log
(
LOG_CRIT
,
"Cannot attach to shared memory: %s"
,
VSM_Error
(
vsm
));
exit
(
EXIT_FAILURE
);
}
vsm_name
=
VSM_Dup
(
vsm
,
"Arg"
,
"-i"
);
AN
(
vsm_name
);
cursor
=
VSL_CursorVSM
(
vsl
,
vsm
,
VSL_COPT_BATCH
|
VSL_COPT_TAIL
);
}
else
...
...
@@ -754,10 +752,10 @@ CHILD_Main(int readconfig)
if
(
!
EMPTY
(
config
.
varnish_bindump
))
LOG_Log
(
LOG_INFO
,
"Reading from file: %s"
,
config
.
varnish_bindump
);
else
{
if
(
EMPTY
(
VSM_Name
(
vsm
)
))
if
(
EMPTY
(
vsm_name
))
LOG_Log0
(
LOG_INFO
,
"Reading default varnish instance"
);
else
LOG_Log
(
LOG_INFO
,
"Reading varnish instance %s"
,
VSM_Name
(
vsm
)
);
LOG_Log
(
LOG_INFO
,
"Reading varnish instance %s"
,
vsm_name
);
}
/* Log filters */
...
...
@@ -909,7 +907,7 @@ CHILD_Main(int readconfig)
while
(
vslq
==
NULL
)
{
AN
(
vsm
);
VTIM_sleep
(
0
.
1
);
if
(
VSM_
Open
(
vsm
)
)
{
if
(
VSM_
Attach
(
vsm
,
-
1
)
<
0
)
{
VSM_ResetError
(
vsm
);
continue
;
}
...
...
@@ -917,7 +915,6 @@ CHILD_Main(int readconfig)
VSL_COPT_TAIL
|
VSL_COPT_BATCH
);
if
(
cursor
==
NULL
)
{
VSL_ResetError
(
vsl
);
VSM_Close
(
vsm
);
continue
;
}
vslq
=
VSLQ_New
(
vsl
,
&
cursor
,
VSL_g_request
,
NULL
);
...
...
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