]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
Revert "s4:messaging: make sure only imessaging_client_init() can be used with a...
authorRalph Boehme <slow@samba.org>
Thu, 27 Dec 2018 11:41:25 +0000 (12:41 +0100)
committerKarolin Seeger <kseeger@samba.org>
Thu, 8 Aug 2019 07:32:21 +0000 (07:32 +0000)
This reverts commit e186d6a06b1b300256a2cb4138f0532d518d0597.

See the discussion in

https://lists.samba.org/archive/samba-technical/2018-December/131731.html

for the reasoning behind this revert.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14033

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 0bd10a48e4c08d1eb3a20e79d952b3c0f12be46a)

source4/lib/messaging/messaging.c

index 4a71b2b76bbdd730aa015ee8baadaa3da6ff5637..890d0dc57c15bd4e9c399a4f5a865d87a242240d 100644 (file)
@@ -381,7 +381,7 @@ NTSTATUS imessaging_reinit_all(void)
 /*
   create the listening socket and setup the dispatcher
 */
-static struct imessaging_context *imessaging_init_internal(TALLOC_CTX *mem_ctx,
+struct imessaging_context *imessaging_init(TALLOC_CTX *mem_ctx,
                                           struct loadparm_context *lp_ctx,
                                           struct server_id server_id,
                                           struct tevent_context *ev)
@@ -645,30 +645,6 @@ static void imessaging_dgm_recv(struct tevent_context *ev,
        }
 }
 
-struct imessaging_context *imessaging_init(TALLOC_CTX *mem_ctx,
-                                          struct loadparm_context *lp_ctx,
-                                          struct server_id server_id,
-                                          struct tevent_context *ev)
-{
-       if (ev == NULL) {
-               return NULL;
-       }
-
-       if (tevent_context_is_wrapper(ev)) {
-               /*
-                * This is really a programmer error!
-                *
-                * The main/raw tevent context should
-                * have been registered first!
-                */
-               DBG_ERR("Should not be used with a wrapper tevent context\n");
-               errno = EINVAL;
-               return NULL;
-       }
-
-       return imessaging_init_internal(mem_ctx, lp_ctx, server_id, ev);
-}
-
 /*
    A hack, for the short term until we get 'client only' messaging in place
 */
@@ -685,7 +661,7 @@ struct imessaging_context *imessaging_client_init(TALLOC_CTX *mem_ctx,
        /* This is because we are not in the s3 serverid database */
        id.unique_id = SERVERID_UNIQUE_ID_NOT_TO_VERIFY;
 
-       return imessaging_init_internal(mem_ctx, lp_ctx, id, ev);
+       return imessaging_init(mem_ctx, lp_ctx, id, ev);
 }
 /*
   a list of registered irpc server functions