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
63d66674
Commit
63d66674
authored
Oct 27, 2013
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move suckaddr all the way through backends (I think...)
parent
33f38803
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
17 additions
and
21 deletions
+17
-21
cache_backend.c
bin/varnishd/cache/cache_backend.c
+1
-1
cache_backend.h
bin/varnishd/cache/cache_backend.h
+3
-3
cache_backend_cfg.c
bin/varnishd/cache/cache_backend_cfg.c
+3
-3
cache_backend_poll.c
bin/varnishd/cache/cache_backend_poll.c
+1
-1
vsa.h
include/vsa.h
+1
-1
vtcp.h
include/vtcp.h
+3
-1
vsa.c
lib/libvarnish/vsa.c
+4
-10
vtcp.c
lib/libvarnish/vtcp.c
+1
-1
No files found.
bin/varnishd/cache/cache_backend.c
View file @
63d66674
...
...
@@ -108,7 +108,7 @@ VBE_ReleaseConn(struct vbc *vc)
static
int
vbe_TryConnect
(
const
struct
busyobj
*
bo
,
int
pf
,
const
struct
s
ockaddr_storage
*
sa
,
const
struct
vdi_simple
*
vs
)
const
struct
s
uckaddr
*
sa
,
const
struct
vdi_simple
*
vs
)
{
int
s
,
i
,
tmo
;
double
tmod
;
...
...
bin/varnishd/cache/cache_backend.h
View file @
63d66674
...
...
@@ -113,8 +113,8 @@ struct backend {
char
*
ipv6_addr
;
char
*
port
;
struct
s
ockaddr_storage
*
ipv4
;
struct
s
ockaddr_storage
*
ipv6
;
struct
s
uckaddr
*
ipv4
;
struct
s
uckaddr
*
ipv6
;
unsigned
n_conn
;
VTAILQ_HEAD
(,
vbc
)
connlist
;
...
...
@@ -139,7 +139,7 @@ struct vbc {
struct
vsl_log
*
vsl
;
int
fd
;
struct
s
ockaddr_storage
*
addr
;
struct
s
uckaddr
*
addr
;
uint8_t
recycled
;
...
...
bin/varnishd/cache/cache_backend_cfg.c
View file @
63d66674
...
...
@@ -151,13 +151,13 @@ VBE_DropRefConn(struct backend *b)
*/
static
void
copy_sockaddr
(
struct
s
ockaddr_storage
**
sa
,
const
void
*
src
)
copy_sockaddr
(
struct
s
uckaddr
**
sa
,
const
struct
suckaddr
*
src
)
{
assert
(
VSA_Sane
(
src
));
*
sa
=
calloc
(
sizeof
**
sa
,
1
);
*
sa
=
calloc
(
1
,
vsa_suckaddr_len
);
XXXAN
(
*
sa
);
memcpy
(
*
sa
,
src
,
VSA_Len
(
src
)
);
memcpy
(
*
sa
,
src
,
vsa_suckaddr_len
);
assert
(
VSA_Sane
(
*
sa
));
}
...
...
bin/varnishd/cache/cache_backend_poll.c
View file @
63d66674
...
...
@@ -105,7 +105,7 @@ static struct lock vbp_mtx;
*/
static
int
vbp_connect
(
int
pf
,
const
struct
s
ockaddr_storage
*
sa
,
int
tmo
)
vbp_connect
(
int
pf
,
const
struct
s
uckaddr
*
sa
,
int
tmo
)
{
int
s
,
i
;
...
...
include/vsa.h
View file @
63d66674
...
...
@@ -36,7 +36,7 @@ extern const int vsa_suckaddr_len;
int
VSA_Sane
(
const
void
*
);
socklen_t
VSA_Len
(
const
void
*
);
unsigned
VSA_Port
(
const
void
*
);
int
VSA_Compare
(
const
void
*
,
const
void
*
);
int
VSA_Compare
(
const
struct
suckaddr
*
,
const
struct
suckaddr
*
);
struct
suckaddr
*
VSA_Malloc
(
const
void
*
s
,
unsigned
sal
);
...
...
include/vtcp.h
View file @
63d66674
...
...
@@ -28,6 +28,8 @@
*
*/
struct
suckaddr
;
/* from libvarnish/tcp.c */
/* NI_MAXHOST and NI_MAXSERV are ridiculously long for numeric format */
#define VTCP_ADDRBUFSIZE 64
...
...
@@ -67,7 +69,7 @@ int VTCP_check_hup(int sock);
#ifdef SOL_SOCKET
void
VTCP_name
(
const
struct
sockaddr_storage
*
addr
,
unsigned
l
,
char
*
abuf
,
unsigned
alen
,
char
*
pbuf
,
unsigned
plen
);
int
VTCP_connect
(
int
s
,
const
struct
s
ockaddr_storage
*
name
,
int
msec
);
int
VTCP_connect
(
int
s
,
const
struct
s
uckaddr
*
name
,
int
msec
);
void
VTCP_close
(
int
*
s
);
void
VTCP_set_read_timeout
(
int
s
,
double
seconds
);
#endif
lib/libvarnish/vsa.c
View file @
63d66674
...
...
@@ -259,17 +259,11 @@ VSA_Len(const void *s)
}
int
VSA_Compare
(
const
void
*
s1
,
const
void
*
s2
)
VSA_Compare
(
const
struct
suckaddr
*
s1
,
const
struct
suckaddr
*
s2
)
{
const
struct
sockaddr
*
sa
=
s1
;
switch
(
sa
->
sa_family
)
{
case
PF_INET
:
case
PF_INET6
:
return
(
memcmp
(
s1
,
s2
,
VSA_Len
(
s1
)));
default:
return
(
-
1
);
}
AN
(
s1
);
AN
(
s2
);
return
(
memcmp
(
s1
,
s2
,
vsa_suckaddr_len
));
}
unsigned
...
...
lib/libvarnish/vtcp.c
View file @
63d66674
...
...
@@ -195,7 +195,7 @@ VTCP_nonblocking(int sock)
*/
int
VTCP_connect
(
int
s
,
const
struct
s
ockaddr_storage
*
name
,
int
msec
)
VTCP_connect
(
int
s
,
const
struct
s
uckaddr
*
name
,
int
msec
)
{
int
i
,
k
;
socklen_t
l
;
...
...
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