summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
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)