Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
1d7cdadd
Commit
1d7cdadd
authored
May 24, 2024
by
Dridi Boukelmoune
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vsm: Centralize VARNISH_DEFAULT_N fallback
Putting the new fallback next to the historical fallback. Refs #4105
parent
39a29a52
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
4 deletions
+3
-4
varnishadm.c
bin/varnishadm/varnishadm.c
+0
-1
vsm.c
lib/libvarnishapi/vsm.c
+3
-2
vut.c
lib/libvarnishapi/vut.c
+0
-1
No files found.
bin/varnishadm/varnishadm.c
View file @
1d7cdadd
...
...
@@ -467,7 +467,6 @@ main(int argc, char * const *argv)
printf
(
OPTARG
"
\n
"
);
exit
(
0
);
}
n_arg
=
getenv
(
"VARNISH_DEFAULT_N"
);
/*
* By default linux::getopt(3) mangles the argv order, such that
* varnishadm -n bla param.set foo -bar
...
...
lib/libvarnishapi/vsm.c
View file @
1d7cdadd
...
...
@@ -346,8 +346,6 @@ VSM_New(void)
ALLOC_OBJ
(
vd
,
VSM_MAGIC
);
AN
(
vd
);
REPLACE
(
vd
->
wdname
,
getenv
(
"VARNISH_DEFAULT_N"
));
vd
->
mgt
=
vsm_newset
(
VSM_MGT_DIRNAME
);
vd
->
mgt
->
flag_running
=
VSM_MGT_RUNNING
;
vd
->
mgt
->
flag_changed
=
VSM_MGT_CHANGED
;
...
...
@@ -756,6 +754,9 @@ VSM_Attach(struct vsm *vd, int progress)
else
t0
=
VTIM_mono
()
+
vd
->
patience
;
if
(
vd
->
wdname
==
NULL
)
REPLACE
(
vd
->
wdname
,
getenv
(
"VARNISH_DEFAULT_N"
));
if
(
vd
->
wdname
==
NULL
)
{
/* Use default (hostname) */
i
=
VSM_Arg
(
vd
,
'n'
,
""
);
...
...
lib/libvarnishapi/vut.c
View file @
1d7cdadd
...
...
@@ -263,7 +263,6 @@ VUT_Init(const char *progname, int argc, char * const *argv,
AZ
(
vut
->
vsl
);
vut
->
vsl
=
VSL_New
();
AN
(
vut
->
vsl
);
REPLACE
(
vut
->
n_arg
,
getenv
(
"VARNISH_DEFAULT_N"
));
return
(
vut
);
}
...
...
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