Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
U
unique-xids
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
unique-xids
Commits
2b1905e6
Commit
2b1905e6
authored
Oct 28, 2011
by
Lasse Karstensen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
works
parent
9902494d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
4 deletions
+47
-4
varnishncsa.c
bin/varnishncsa/varnishncsa.c
+47
-4
No files found.
bin/varnishncsa/varnishncsa.c
View file @
2b1905e6
...
@@ -725,6 +725,10 @@ h_ncsa(void *priv, enum VSL_tag_e tag, unsigned fd,
...
@@ -725,6 +725,10 @@ h_ncsa(void *priv, enum VSL_tag_e tag, unsigned fd,
case
'{'
:
{
case
'{'
:
{
const
char
*
h
,
*
tmp
;
const
char
*
h
,
*
tmp
;
char
fname
[
100
],
type
;
char
fname
[
100
],
type
;
// maybe
const
char
*
key2
;
tmp
=
p
;
tmp
=
p
;
type
=
0
;
type
=
0
;
while
(
*
tmp
!=
'\0'
&&
*
tmp
!=
'}'
)
while
(
*
tmp
!=
'\0'
&&
*
tmp
!=
'}'
)
...
@@ -761,11 +765,50 @@ h_ncsa(void *priv, enum VSL_tag_e tag, unsigned fd,
...
@@ -761,11 +765,50 @@ h_ncsa(void *priv, enum VSL_tag_e tag, unsigned fd,
VSB_cat
(
os
,
(
lp
->
df_handling
?
lp
->
df_handling
:
"-"
));
VSB_cat
(
os
,
(
lp
->
df_handling
?
lp
->
df_handling
:
"-"
));
p
=
tmp
;
p
=
tmp
;
break
;
break
;
}
else
if
(
strcmp
(
fname
,
"Varnish:vcllog"
)
==
0
)
{
// } else if (strcmp(fname, "Varnish:vcllog") == 0) {
VSB_cat
(
os
,
(
lp
->
log1
?
lp
->
log1
:
"-"
));
// VSB_cat(os, (lp->log1 ? lp->log1 : "-"));
// p = tmp;
// break;
}
case
'l'
:
// std.log("Foo: bar")
// %{Foo}l
printf
(
"case l was hit with fname: %s
\n
"
,
fname
);
// Extract "Foo" from fname
char
*
delim
;
char
keyword
[
100
];
char
*
kwptr
;
char
*
startpos
;
// keyword = "init";
delim
=
strchr
(
fname
,
':'
);
printf
(
": found at %d
\n
"
,
delim
-
fname
);
// startpos = delim - fname;
// buffer overflow all the way.
startpos
=
strncpy
(
keyword
,
delim
+
1
,
sizeof
keyword
);
printf
(
"meh"
);
printf
(
"startpos is: %d
\n
"
,
startpos
);
printf
(
"rest is: %s
\n
"
,
delim
+
1
);
// startpos);
printf
(
"keyword is: %s
\n
"
,
keyword
);
//keyword = delim + 1;
// printf("split2: %d\n", *split2);
// key2 = trimline(fname, split2);
//&&printf("key: %s\n", key2);
//keyword = strcpy("bar"; // trimline(fname+1, split);
//keyword = "foo";
//strcpy(key2, "bar"); // trimline(fname+1, split);
h
=
vcl_log
(
lp
,
keyword
);
VSB_cat
(
os
,
h
?
h
:
"-"
);
p
=
tmp
;
p
=
tmp
;
break
;
break
;
}
///////
default:
default:
fprintf
(
stderr
,
"Unknown format starting at: %s
\n
"
,
--
p
);
fprintf
(
stderr
,
"Unknown format starting at: %s
\n
"
,
--
p
);
...
...
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