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
ee5b6458
Commit
ee5b6458
authored
Jun 28, 2018
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
VRT_new_backend_clustered: swap success and error handling
... to make the next commit more readable
parent
e9eb047b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
22 deletions
+21
-22
cache_backend.c
bin/varnishd/cache/cache_backend.c
+21
-22
No files found.
bin/varnishd/cache/cache_backend.c
View file @
ee5b6458
...
...
@@ -527,33 +527,32 @@ VRT_new_backend_clustered(VRT_CTX, struct vsmw_cluster *vc,
be
->
director
=
VRT_AddDirector
(
ctx
,
vbe_methods
,
be
,
"%s"
,
vrt
->
vcl_name
);
if
(
be
->
director
==
NULL
)
{
VSC_vbe_Destroy
(
&
be
->
vsc_seg
);
if
(
be
->
director
!=
NULL
)
{
vbp
=
vrt
->
probe
;
if
(
vbp
==
NULL
)
vbp
=
VCL_DefaultProbe
(
vcl
);
Lck_Lock
(
&
backends_mtx
);
VTAILQ_INSERT_TAIL
(
&
backends
,
be
,
list
);
VSC_C_main
->
n_backend
++
;
be
->
tcp_pool
=
VTP_Ref
(
vrt
->
ipv4_suckaddr
,
vrt
->
ipv6_suckaddr
,
vrt
->
path
,
vbe_proto_ident
);
Lck_Unlock
(
&
backends_mtx
);
if
(
vbp
!=
NULL
)
VBP_Insert
(
be
,
vbp
,
be
->
tcp_pool
);
return
(
be
->
director
);
}
VSC_vbe_Destroy
(
&
be
->
vsc_seg
);
#define DA(x) do { if (be->x != NULL) free(be->x); } while (0)
#define DN(x)
/**/
VRT_BACKEND_HANDLE
();
#undef DA
#undef DN
Lck_Delete
(
&
be
->
mtx
);
FREE_OBJ
(
be
);
return
(
NULL
);
}
vbp
=
vrt
->
probe
;
if
(
vbp
==
NULL
)
vbp
=
VCL_DefaultProbe
(
vcl
);
Lck_Lock
(
&
backends_mtx
);
VTAILQ_INSERT_TAIL
(
&
backends
,
be
,
list
);
VSC_C_main
->
n_backend
++
;
be
->
tcp_pool
=
VTP_Ref
(
vrt
->
ipv4_suckaddr
,
vrt
->
ipv6_suckaddr
,
vrt
->
path
,
vbe_proto_ident
);
Lck_Unlock
(
&
backends_mtx
);
if
(
vbp
!=
NULL
)
VBP_Insert
(
be
,
vbp
,
be
->
tcp_pool
);
return
(
be
->
director
);
Lck_Delete
(
&
be
->
mtx
);
FREE_OBJ
(
be
);
return
(
NULL
);
}
VCL_BACKEND
v_matchproto_
()
...
...
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