smbd_open_one_socket does not use the messaging_context variable so why pass it in?

Richard Sharpe realrichardsharpe at gmail.com
Sun Nov 11 10:59:22 MST 2012


Hi folks,

I notice that smbd_open_one_socket does not use the messaging context,
so I suggest this patch:

[rsharpe at localhost source3]$ git diff smbd/server.c
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index 7113eae..1cd9288 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -551,7 +551,7 @@ static void smbd_accept_connection(struct tevent_context *ev
                return;

        if (fd == -1) {
-               DEBUG(0,("open_sockets_smbd: accept: %s\n",
+               DEBUG(0,("accept: %s\n",
                         strerror(errno)));
                return;
        }
@@ -662,7 +662,6 @@ 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)
 {
@@ -792,7 +791,6 @@ static bool open_sockets_smbd(struct smbd_parent_context *pa

                                if (!smbd_open_one_socket(parent,
                                                          ev_ctx,
-                                                         msg_ctx,
                                                          ifss,
                                                          port)) {
                                        return false;
@@ -834,7 +832,6 @@ static bool open_sockets_smbd(struct smbd_parent_context *pa

                                if (!smbd_open_one_socket(parent,
                                                          ev_ctx,
-                                                         msg_ctx,
                                                          &ss,
                                                          port)) {
                                        return false;


-- 
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)


More information about the samba-technical mailing list