summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-07-22 13:43:02 +0200
committerStefan Metzmacher <metze@samba.org>2011-07-22 17:06:08 +0200
commit48de32936389612240203d3d12016d8730aeb64c (patch)
treeec57cace4db0bbd3656b7000d8ca7b34fd1ab6a8 /source3
parentcc4b2a6dc31cd2e1609d18da27ea8f3caadeaf28 (diff)
downloadsamba-48de32936389612240203d3d12016d8730aeb64c.tar.gz
samba-48de32936389612240203d3d12016d8730aeb64c.tar.bz2
samba-48de32936389612240203d3d12016d8730aeb64c.zip
s3:libsmb: move cli_state->{src_ss,dest_ss} to cli_state->conn.{local_ss,remote_ss}
metze
Diffstat (limited to 'source3')
-rw-r--r--source3/include/client.h4
-rw-r--r--source3/libsmb/clientgen.c12
2 files changed, 8 insertions, 8 deletions
diff --git a/source3/include/client.h b/source3/include/client.h
index 4043774e22..86c5f22ce5 100644
--- a/source3/include/client.h
+++ b/source3/include/client.h
@@ -74,8 +74,6 @@ struct cli_state {
char *share;
char *dev;
- struct sockaddr_storage src_ss;
- struct sockaddr_storage dest_ss;
DATA_BLOB secblob; /* cryptkey or negTokenInit */
uint32 sesskey;
@@ -125,6 +123,8 @@ struct cli_state {
struct {
int fd;
+ struct sockaddr_storage local_ss;
+ struct sockaddr_storage remote_ss;
struct tevent_queue *outgoing;
struct tevent_req **pending;
} conn;
diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c
index cc5ff49254..f86b2b5077 100644
--- a/source3/libsmb/clientgen.c
+++ b/source3/libsmb/clientgen.c
@@ -245,16 +245,16 @@ struct cli_state *cli_state_create(TALLOC_CTX *mem_ctx,
cli->conn.fd = fd;
- ss_length = sizeof(cli->src_ss);
+ ss_length = sizeof(cli->conn.local_ss);
ret = getsockname(fd,
- (struct sockaddr *)(void *)&cli->src_ss,
+ (struct sockaddr *)(void *)&cli->conn.local_ss,
&ss_length);
if (ret == -1) {
goto error;
}
- ss_length = sizeof(cli->dest_ss);
+ ss_length = sizeof(cli->conn.remote_ss);
ret = getpeername(fd,
- (struct sockaddr *)(void *)&cli->dest_ss,
+ (struct sockaddr *)(void *)&cli->conn.remote_ss,
&ss_length);
if (ret == -1) {
goto error;
@@ -368,12 +368,12 @@ void cli_sockopt(struct cli_state *cli, const char *options)
const struct sockaddr_storage *cli_state_local_sockaddr(struct cli_state *cli)
{
- return &cli->src_ss;
+ return &cli->conn.local_ss;
}
const struct sockaddr_storage *cli_state_remote_sockaddr(struct cli_state *cli)
{
- return &cli->dest_ss;
+ return &cli->conn.remote_ss;
}
uint16_t cli_state_get_vc_num(struct cli_state *cli)