s3-smbd: Pass ev_ctx and msg_ctx to smbd_accept_connection().
authorAndreas Schneider <asn@samba.org>
Tue, 21 Jun 2011 12:14:18 +0000 (14:14 +0200)
committerAndreas Schneider <asn@samba.org>
Thu, 14 Jul 2011 14:10:46 +0000 (16:10 +0200)
source3/smbd/server.c

index 50b205324a87a2b5b74ca6d64b2a47d89d11a7d0..4991331a8f2f38154be7eb85378425b8ade55275 100644 (file)
@@ -513,6 +513,8 @@ static void smbd_accept_connection(struct tevent_context *ev,
 }
 
 static bool smbd_open_one_socket(struct smbd_parent_context *parent,
+                                struct tevent_context *ev_ctx,
+                                struct messaging_context *msg_ctx,
                                 const struct sockaddr_storage *ifss,
                                 uint16_t port)
 {
@@ -555,7 +557,7 @@ static bool smbd_open_one_socket(struct smbd_parent_context *parent,
                return false;
        }
 
-       s->fde = tevent_add_fd(server_event_context(),
+       s->fde = tevent_add_fd(ev_ctx,
                               s,
                               s->fd, TEVENT_FD_READ,
                               smbd_accept_connection,
@@ -663,7 +665,11 @@ static bool open_sockets_smbd(struct smbd_parent_context *parent,
                                        dns_port = port;
                                }
 
-                               if (!smbd_open_one_socket(parent, ifss, port)) {
+                               if (!smbd_open_one_socket(parent,
+                                                         ev_ctx,
+                                                         msg_ctx,
+                                                         ifss,
+                                                         port)) {
                                        return false;
                                }
                        }
@@ -710,7 +716,11 @@ static bool open_sockets_smbd(struct smbd_parent_context *parent,
                                        continue;
                                }
 
-                               if (!smbd_open_one_socket(parent, &ss, port)) {
+                               if (!smbd_open_one_socket(parent,
+                                                         ev_ctx,
+                                                         msg_ctx,
+                                                         &ss,
+                                                         port)) {
                                        return false;
                                }
                        }