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
23333e3c
Commit
23333e3c
authored
Sep 05, 2017
by
Dridi Boukelmoune
Committed by
Pål Hermunn Johansen
Sep 06, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove irrelevant limits that were caused by VSC
Closes #2406 Refs #2157
parent
97c02d22
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
22 deletions
+20
-22
mgt_stevedore.c
bin/varnishd/storage/mgt_stevedore.c
+7
-10
storage.h
bin/varnishd/storage/storage.h
+1
-1
r02406.vtc
bin/varnishtest/tests/r02406.vtc
+12
-0
vcc_backend.c
lib/libvcc/vcc_backend.c
+0
-10
vcc_compile.h
lib/libvcc/vcc_compile.h
+0
-1
No files found.
bin/varnishd/storage/mgt_stevedore.c
View file @
23333e3c
...
...
@@ -143,11 +143,11 @@ stv_check_ident(const char *spec, const char *ident)
void
STV_Config
(
const
char
*
spec
)
{
char
**
av
;
char
**
av
,
buf
[
8
]
;
const
char
*
name
;
struct
stevedore
*
stv
;
const
struct
stevedore
*
stv2
;
int
ac
,
l
;
int
ac
;
static
unsigned
seq
=
0
;
av
=
MGT_NamedArg
(
spec
,
&
name
,
"-s"
);
...
...
@@ -174,16 +174,13 @@ STV_Config(const char *spec)
*
stv
=
*
stv2
;
AN
(
stv
->
name
);
if
(
name
==
NULL
)
bprintf
(
stv
->
ident
,
"s%u"
,
seq
++
);
else
{
/* XXX: no need for truncation once VSM ident becomes dynamic */
l
=
strlen
(
name
);
if
(
l
>
sizeof
stv
->
ident
-
1
)
l
=
sizeof
stv
->
ident
-
1
;
bprintf
(
stv
->
ident
,
"%.*s"
,
l
,
name
);
if
(
name
==
NULL
)
{
bprintf
(
buf
,
"s%u"
,
seq
++
);
name
=
buf
;
}
stv
->
ident
=
strdup
(
name
);
AN
(
stv
->
ident
);
stv_check_ident
(
spec
,
stv
->
ident
);
if
(
stv
->
init
!=
NULL
)
...
...
bin/varnishd/storage/storage.h
View file @
23333e3c
...
...
@@ -119,7 +119,7 @@ struct stevedore {
void
*
priv
;
VTAILQ_ENTRY
(
stevedore
)
list
;
char
ident
[
16
];
/* XXX: match VSM_chunk.ident */
char
*
ident
;
char
*
vclname
;
};
...
...
bin/varnishtest/tests/r02406.vtc
0 → 100644
View file @
23333e3c
varnishtest "Long backend and storage names"
varnish v1 -arg "-s acme_example_com_static_assets_malloc_storage=malloc"
varnish v1 -vcl {
backend be_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789 {
.host = "${bad_backend}";
}
} -start
varnish v1 -expect SMA.acme_example_com_static_assets_malloc_storage.c_req == 0
varnish v1 -expect VBE.vcl1.be_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789.req == 0
lib/libvcc/vcc_backend.c
View file @
23333e3c
...
...
@@ -469,16 +469,6 @@ vcc_ParseBackend(struct vcc *tl)
vcc_ExpectVid
(
tl
,
"backend"
);
/* ID: name */
ERRCHK
(
tl
);
/* XXX: lift this limit once VSM ident becomes dynamic */
if
(
tl
->
t
->
e
-
tl
->
t
->
b
>
MAX_BACKEND_NAME
)
{
VSB_printf
(
tl
->
sb
,
"Name of %.*s too long (max %d, is %zu):
\n
"
,
PF
(
t_first
),
MAX_BACKEND_NAME
,
(
size_t
)(
tl
->
t
->
e
-
tl
->
t
->
b
));
vcc_ErrWhere
(
tl
,
tl
->
t
);
return
;
}
t_be
=
tl
->
t
;
vcc_NextToken
(
tl
);
...
...
lib/libvcc/vcc_compile.h
View file @
23333e3c
...
...
@@ -234,7 +234,6 @@ void vcc_Acl_Hack(struct vcc *tl, char *b, size_t bl);
int
vcc_ParseAction
(
struct
vcc
*
tl
);
/* vcc_backend.c */
#define MAX_BACKEND_NAME 64
struct
fld_spec
;
void
vcc_ParseProbe
(
struct
vcc
*
tl
);
...
...
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