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
8f15d608
Commit
8f15d608
authored
May 01, 2015
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add the -N CLI option (config param varnish.file)
parent
1bb84661
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
8 deletions
+17
-8
config.c
src/config.c
+3
-0
regress.sh
src/test/regress.sh
+1
-1
trackrdrd.c
src/trackrdrd.c
+13
-7
No files found.
src/config.c
View file @
8f15d608
...
...
@@ -117,6 +117,7 @@ CONF_Add(const char *lval, const char *rval)
confString
(
"pid.file"
,
pid_file
);
confString
(
"varnish.name"
,
varnish_name
);
confString
(
"varnish.file"
,
vsmfile
);
confString
(
"log.file"
,
log_file
);
confString
(
"varnish.bindump"
,
varnish_bindump
);
confString
(
"mq.module"
,
mq_module
);
...
...
@@ -206,6 +207,7 @@ CONF_Init(void)
strcpy
(
config
.
pid_file
,
"/var/run/trackrdrd.pid"
);
config
.
varnish_name
[
0
]
=
'\0'
;
config
.
vsmfile
[
0
]
=
'\0'
;
config
.
log_file
[
0
]
=
'\0'
;
config
.
varnish_bindump
[
0
]
=
'\0'
;
config
.
syslog_facility
=
LOG_LOCAL0
;
...
...
@@ -255,6 +257,7 @@ CONF_Dump(int level)
{
confdump
(
level
,
"pid.file = %s"
,
config
.
pid_file
);
confdump
(
level
,
"varnish.name = %s"
,
config
.
varnish_name
);
confdump
(
level
,
"varnish.file = %s"
,
config
.
vsmfile
);
confdump
(
level
,
"log.file = %s"
,
strcmp
(
config
.
log_file
,
"-"
)
==
0
?
"stdout"
:
config
.
log_file
);
confdump
(
level
,
"varnish.bindump = %s"
,
config
.
varnish_bindump
);
...
...
src/test/regress.sh
View file @
8f15d608
...
...
@@ -21,7 +21,7 @@ CMD="../trackrdrd -D -f varnish.binlog -l - -d -c test.conf"
# the user running it
CKSUM
=
$(
$CMD
|
sed
-e
's/\(initializing\) \(.*\)/\1/'
|
sed
-e
's/\(Running as\) \([a-zA-Z0-9]*\)$/\1/'
|
grep
-v
'Not running as root'
|
cksum
)
if
[
"
$CKSUM
"
!=
'1
219831915 249619
'
]
;
then
if
[
"
$CKSUM
"
!=
'1
821498238 249681
'
]
;
then
echo
"ERROR: Regression test incorrect log cksum:
$CKSUM
"
exit
1
fi
...
...
src/trackrdrd.c
View file @
8f15d608
...
...
@@ -222,7 +222,7 @@ main(int argc, char * const *argv)
{
int
c
,
d_flag
=
0
,
D_flag
=
0
,
err
;
const
char
*
P_arg
=
NULL
,
*
l_arg
=
NULL
,
*
n_arg
=
NULL
,
*
f_arg
=
NULL
,
*
y_arg
=
NULL
,
*
c_arg
=
NULL
,
*
u_arg
=
NULL
;
*
y_arg
=
NULL
,
*
c_arg
=
NULL
,
*
u_arg
=
NULL
,
*
N_arg
=
NULL
;
pid_t
child_pid
;
CONF_Init
();
...
...
@@ -234,7 +234,7 @@ main(int argc, char * const *argv)
}
cli_config_filename
[
0
]
=
'\0'
;
while
((
c
=
getopt
(
argc
,
argv
,
"u:P:Vn:hl:df:y:c:D"
))
!=
-
1
)
{
while
((
c
=
getopt
(
argc
,
argv
,
"u:P:Vn:hl:df:y:c:D
N:
"
))
!=
-
1
)
{
switch
(
c
)
{
case
'P'
:
P_arg
=
optarg
;
...
...
@@ -245,6 +245,9 @@ main(int argc, char * const *argv)
case
'n'
:
n_arg
=
optarg
;
break
;
case
'N'
:
N_arg
=
optarg
;
break
;
case
'l'
:
l_arg
=
optarg
;
break
;
...
...
@@ -283,7 +286,9 @@ main(int argc, char * const *argv)
exit
(
EXIT_FAILURE
);
}
if
(
f_arg
&&
n_arg
)
if
(
n_arg
&&
N_arg
)
usage
(
EXIT_FAILURE
);
if
(
f_arg
&&
(
n_arg
||
N_arg
))
usage
(
EXIT_FAILURE
);
if
(
l_arg
&&
y_arg
)
usage
(
EXIT_FAILURE
);
...
...
@@ -310,9 +315,10 @@ main(int argc, char * const *argv)
bprintf
(
config
.
varnish_name
,
"%s"
,
n_arg
);
if
(
l_arg
)
bprintf
(
config
.
log_file
,
"%s"
,
l_arg
);
if
(
f_arg
)
{
if
(
f_arg
)
bprintf
(
config
.
varnish_bindump
,
"%s"
,
f_arg
);
}
if
(
N_arg
)
bprintf
(
config
.
vsmfile
,
"%s"
,
N_arg
);
if
(
LOG_Open
(
PACKAGE_NAME
)
!=
0
)
{
exit
(
EXIT_FAILURE
);
...
...
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