summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-12-13 08:30:39 +0100
committerStefan Metzmacher <metze@samba.org>2011-12-13 12:36:35 +0100
commit20c343b8e89df2b87b40b38017b77fa342640f8c (patch)
tree0eb752d16c39a896872024c23f57d244cf8de478 /source3
parente09c675596bb7ae44fda7ee0ba7423761eb4e2e1 (diff)
downloadsamba-20c343b8e89df2b87b40b38017b77fa342640f8c.tar.gz
samba-20c343b8e89df2b87b40b38017b77fa342640f8c.tar.bz2
samba-20c343b8e89df2b87b40b38017b77fa342640f8c.zip
s3:smbd/server: remember the msg_ctx on the smbd_parent_context
metze
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/server.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index 9ce956db10..4df68f9b45 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -358,6 +358,8 @@ struct smbd_open_socket;
struct smbd_parent_context {
bool interactive;
+ struct messaging_context *msg_ctx;
+
/* the list of listening sockets */
struct smbd_open_socket *sockets;
};
@@ -367,7 +369,6 @@ struct smbd_open_socket {
struct smbd_parent_context *parent;
int fd;
struct tevent_fd *fde;
- struct messaging_context *msg_ctx;
};
static void smbd_open_socket_close_fn(struct tevent_context *ev,
@@ -386,7 +387,7 @@ static void smbd_accept_connection(struct tevent_context *ev,
{
struct smbd_open_socket *s = talloc_get_type_abort(private_data,
struct smbd_open_socket);
- struct messaging_context *msg_ctx = s->msg_ctx;
+ struct messaging_context *msg_ctx = s->parent->msg_ctx;
struct smbd_server_connection *sconn = msg_ctx_to_sconn(msg_ctx);
struct sockaddr_storage addr;
socklen_t in_addrlen = sizeof(addr);
@@ -573,7 +574,6 @@ static bool smbd_open_one_socket(struct smbd_parent_context *parent,
return false;
}
- s->msg_ctx = msg_ctx;
s->fde = tevent_add_fd(ev_ctx,
s,
s->fd, TEVENT_FD_READ,
@@ -1288,7 +1288,7 @@ extern void build_options(bool screen);
exit_server("talloc(struct smbd_parent_context) failed");
}
parent->interactive = interactive;
-
+ parent->msg_ctx = msg_ctx;
if (!open_sockets_smbd(parent, ev_ctx, msg_ctx, ports))
exit_server("open_sockets_smbd() failed");