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
33f38803
Commit
33f38803
authored
Oct 27, 2013
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Start percolating struct suckaddr out of the VGC code to VRT.
parent
c6fdc398
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
13 deletions
+15
-13
cache_backend_cfg.c
bin/varnishd/cache/cache_backend_cfg.c
+9
-9
vrt.h
include/vrt.h
+2
-2
vcc_backend.c
lib/libvcc/vcc_backend.c
+4
-2
No files found.
bin/varnishd/cache/cache_backend_cfg.c
View file @
33f38803
...
...
@@ -174,7 +174,7 @@ VBE_AddBackend(struct cli *cli, const struct vrt_backend *vb)
char
buf
[
128
];
AN
(
vb
->
vcl_name
);
assert
(
vb
->
ipv4_s
ockaddr
!=
NULL
||
vb
->
ipv6_so
ckaddr
!=
NULL
);
assert
(
vb
->
ipv4_s
uckaddr
!=
NULL
||
vb
->
ipv6_su
ckaddr
!=
NULL
);
(
void
)
cli
;
ASSERT_CLI
();
...
...
@@ -183,11 +183,11 @@ VBE_AddBackend(struct cli *cli, const struct vrt_backend *vb)
CHECK_OBJ_NOTNULL
(
b
,
BACKEND_MAGIC
);
if
(
strcmp
(
b
->
vcl_name
,
vb
->
vcl_name
))
continue
;
if
(
vb
->
ipv4_s
o
ckaddr
!=
NULL
&&
VSA_Compare
(
b
->
ipv4
,
vb
->
ipv4_s
o
ckaddr
))
if
(
vb
->
ipv4_s
u
ckaddr
!=
NULL
&&
VSA_Compare
(
b
->
ipv4
,
vb
->
ipv4_s
u
ckaddr
))
continue
;
if
(
vb
->
ipv6_s
o
ckaddr
!=
NULL
&&
VSA_Compare
(
b
->
ipv6
,
vb
->
ipv6_s
o
ckaddr
))
if
(
vb
->
ipv6_s
u
ckaddr
!=
NULL
&&
VSA_Compare
(
b
->
ipv6
,
vb
->
ipv6_s
u
ckaddr
))
continue
;
b
->
refcount
++
;
b
->
vsc
->
vcls
++
;
...
...
@@ -223,10 +223,10 @@ VBE_AddBackend(struct cli *cli, const struct vrt_backend *vb)
/*
* Copy over the sockaddrs
*/
if
(
vb
->
ipv4_s
o
ckaddr
!=
NULL
)
copy_sockaddr
(
&
b
->
ipv4
,
vb
->
ipv4_s
o
ckaddr
);
if
(
vb
->
ipv6_s
o
ckaddr
!=
NULL
)
copy_sockaddr
(
&
b
->
ipv6
,
vb
->
ipv6_s
o
ckaddr
);
if
(
vb
->
ipv4_s
u
ckaddr
!=
NULL
)
copy_sockaddr
(
&
b
->
ipv4
,
vb
->
ipv4_s
u
ckaddr
);
if
(
vb
->
ipv6_s
u
ckaddr
!=
NULL
)
copy_sockaddr
(
&
b
->
ipv6
,
vb
->
ipv6_s
u
ckaddr
);
assert
(
b
->
ipv4
!=
NULL
||
b
->
ipv6
!=
NULL
);
...
...
include/vrt.h
View file @
33f38803
...
...
@@ -125,8 +125,8 @@ struct vrt_backend {
const
char
*
ipv6_addr
;
const
char
*
port
;
const
void
*
ipv4_so
ckaddr
;
const
void
*
ipv6_so
ckaddr
;
const
struct
suckaddr
*
ipv4_su
ckaddr
;
const
struct
suckaddr
*
ipv6_su
ckaddr
;
const
char
*
hosthdr
;
...
...
lib/libvcc/vcc_backend.c
View file @
33f38803
...
...
@@ -65,11 +65,13 @@ Emit_Sockaddr(struct vcc *tl, const struct token *t_host, const char *port)
&
ipv4
,
&
ipv4a
,
&
ipv6
,
&
ipv6a
,
&
pa
,
2
,
t_host
,
"Backend host"
);
ERRCHK
(
tl
);
if
(
ipv4
!=
NULL
)
{
Fb
(
tl
,
0
,
"
\t
.ipv4_sockaddr = %s,
\n
"
,
ipv4
);
Fb
(
tl
,
0
,
"
\t
.ipv4_suckaddr = (const struct suckaddr *)%s,
\n
"
,
ipv4
);
Fb
(
tl
,
0
,
"
\t
.ipv4_addr =
\"
%s
\"
,
\n
"
,
ipv4a
);
}
if
(
ipv6
!=
NULL
)
{
Fb
(
tl
,
0
,
"
\t
.ipv6_sockaddr = %s,
\n
"
,
ipv6
);
Fb
(
tl
,
0
,
"
\t
.ipv6_suckaddr = (const struct suckaddr *)%s,
\n
"
,
ipv6
);
Fb
(
tl
,
0
,
"
\t
.ipv6_addr =
\"
%s
\"
,
\n
"
,
ipv6a
);
}
Fb
(
tl
,
0
,
"
\t
.port =
\"
%s
\"
,
\n
"
,
pa
);
...
...
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