Use a custom init function for samba4 that sets a samba4
authorSimo Sorce <idra@samba.org>
Sat, 14 Jun 2008 17:00:53 +0000 (13:00 -0400)
committerSimo Sorce <idra@samba.org>
Sat, 14 Jun 2008 17:00:53 +0000 (13:00 -0400)
specific debug function.
By default do not debug, this is the most appropriate action for a library
as we cannot assume what stderr is use for in the main app.
The main app is responsible to set ev_debug_stderr if they so desire.

37 files changed:
source/client/cifsdd.c
source/client/client.c
source/cluster/ctdb/ib/ibwrapper_test.c
source/cluster/ctdb/server/ctdb_daemon.c
source/cluster/ctdb/server/ctdb_recoverd.c
source/cluster/ctdb/server/ctdbd.c
source/cluster/ctdb/tests/ctdb_bench.c
source/cluster/ctdb/tests/ctdb_fetch.c
source/cluster/ctdb/tests/ctdb_store.c
source/cluster/ctdb/tools/ctdb.c
source/dsdb/samdb/samdb.c
source/lib/events/events.h
source/lib/events/events_debug.c
source/lib/events/events_s4.c
source/lib/ldb/ldb_ildap/ldb_ildap.c
source/lib/messaging/pymessaging.c
source/lib/registry/registry_wrap.c
source/lib/registry/tools/regdiff.c
source/lib/registry/tools/regpatch.c
source/lib/registry/tools/regshell.c
source/lib/registry/tools/regtree.c
source/libcli/nbt/pynbt.c
source/libcli/swig/libcli_smb_wrap.c
source/libnet/py_net.c
source/librpc/rpc/pyrpc.c
source/smbd/process_prefork.c
source/smbd/process_standard.c
source/smbd/process_thread.c
source/smbd/server.c
source/torture/gentest.c
source/torture/locktest.c
source/torture/locktest2.c
source/torture/masktest.c
source/torture/smbtorture.c
source/utils/net/net.c
source/utils/nmblookup.c
source/utils/ntlm_auth.c

index ce48c7bad1f7f73422b6bbb8038bdf7a6e6e22b4..141b165ad44808e68f61011137720593411afa16 100644 (file)
@@ -581,7 +581,7 @@ int main(int argc, const char ** argv)
                }
        }
 
-       ev = event_context_init(talloc_autofree_context());
+       ev = s4_event_context_init(talloc_autofree_context());
 
        gensec_init(cmdline_lp_ctx);
        dump_args();
index 01197e8a9ee8cc2abffaf9ade19a01c00ed5eb18..e05e195372f2ca362d54b7e52321e2caf6a79861 100644 (file)
@@ -3228,7 +3228,7 @@ static int do_message_op(const char *netbios_name, const char *desthost,
 
        lp_smbcli_options(cmdline_lp_ctx, &smb_options);
 
-       ev_ctx = event_context_init(talloc_autofree_context());
+       ev_ctx = s4_event_context_init(talloc_autofree_context());
 
        DEBUG( 3, ( "Client started (version %s).\n", SAMBA_VERSION_STRING ) );
 
index 07c78e7709eb1da03faf7190b0dc27eeafad50d8..1be37ddd2873bfc062ba7e8047fb80e4b81ead1d 100644 (file)
@@ -604,7 +604,7 @@ int main(int argc, char *argv[])
                goto cleanup;
        }
 
-       ev = event_context_init(NULL);
+       ev = s4_event_context_init(NULL);
        assert(ev);
 
        tcx->ibwctx = ibw_init(tcx->attrs, tcx->nattrs,
index 32aa2ba2724aea3fa7d53066d2cd11f4d4f320bd..f96cd86916bdb7c89f12c35268dca0ba06daddc1 100644 (file)
@@ -650,7 +650,7 @@ int ctdb_start_daemon(struct ctdb_context *ctdb, bool do_fork)
        domain_socket_name = talloc_strdup(talloc_autofree_context(), ctdb->daemon.name);
        talloc_set_destructor(domain_socket_name, unlink_destructor);   
 
-       ctdb->ev = event_context_init(NULL);
+       ctdb->ev = s4_event_context_init(NULL);
 
        /* start frozen, then let the first election sort things out */
        if (!ctdb_blocking_freeze(ctdb)) {
index 5cb985521d7a2781029417c27d08326e80475e80..8ebd357c147e04911e52cdc7c1f5a5f4799c823e 100644 (file)
@@ -1487,7 +1487,7 @@ int ctdb_start_recoverd(struct ctdb_context *ctdb)
 
        /* get a new event context */
        talloc_free(ctdb->ev);
-       ctdb->ev = event_context_init(ctdb);
+       ctdb->ev = s4_event_context_init(ctdb);
 
        event_add_fd(ctdb->ev, ctdb, fd[0], EVENT_FD_READ|EVENT_FD_AUTOCLOSE, 
                     ctdb_recoverd_parent, &fd[0]);     
index 2c4a23b67396aec371caedfcc2e4dfa66ad17966..9729902f507c5cdbe224efe31afc3546f9e43b2f 100644 (file)
@@ -141,7 +141,7 @@ int main(int argc, const char *argv[])
 
        block_signal(SIGPIPE);
 
-       ev = event_context_init(NULL);
+       ev = s4_event_context_init(NULL);
 
        ctdb = ctdb_cmdline_init(ev);
 
index f1292ee275d9e953f9f3bf2a548ade97988c0594..77b7f15d358b82457ebf4194c4b41c92e53dad70 100644 (file)
@@ -192,7 +192,7 @@ int main(int argc, const char *argv[])
                while (extra_argv[extra_argc]) extra_argc++;
        }
 
-       ev = event_context_init(NULL);
+       ev = s4_event_context_init(NULL);
 
        /* initialise ctdb */
        ctdb = ctdb_cmdline_client(ev);
index f57d05d09931db52391bb41c2b6523390b8d83e4..d5ec645757d273cf0f7582b21063e5dae99ad1da 100644 (file)
@@ -211,7 +211,7 @@ int main(int argc, const char *argv[])
                while (extra_argv[extra_argc]) extra_argc++;
        }
 
-       ev = event_context_init(NULL);
+       ev = s4_event_context_init(NULL);
 
        ctdb = ctdb_cmdline_client(ev);
 
index a60e009b91076d52f39da5149c21ac64f23f4053..8b44276d21cb4d5f83f5bd8c17d0cb5e49a8f46e 100644 (file)
@@ -131,7 +131,7 @@ int main(int argc, const char *argv[])
                while (extra_argv[extra_argc]) extra_argc++;
        }
 
-       ev = event_context_init(NULL);
+       ev = s4_event_context_init(NULL);
 
        ctdb = ctdb_cmdline_client(ev);
 
index 2308261d00535eb0079063ed30bf2a1ac7ee5587..3be42cee5b960e8109546d9e2359a2800905640c 100644 (file)
@@ -977,7 +977,7 @@ int main(int argc, const char *argv[])
 
        control = extra_argv[0];
 
-       ev = event_context_init(NULL);
+       ev = s4_event_context_init(NULL);
 
        /* initialise ctdb */
        ctdb = ctdb_cmdline_client(ev);
index 4557b6c9ccb49d989307cfb5080078ad5b97a5ed..acc2c2a9a15925e7171bda134c275fd5eca08a8c 100644 (file)
@@ -121,7 +121,7 @@ int samdb_copy_template(struct ldb_context *ldb,
                /* FIXME: need to remove this wehn we finally pass the event
                 * context around in ldb */
                if (event_ctx == NULL) {
-                       event_ctx = event_context_init(templates_ldb);
+                       event_ctx = s4_event_context_init(templates_ldb);
                }
 
                templates_ldb = ldb_wrap_connect(ldb, event_ctx, lp_ctx, 
index 750cdfee050c9ceee89e6057dd072531a2bc9dd5..478f127a3527352e69c84066925025499cc19a7e 100644 (file)
@@ -43,7 +43,6 @@ typedef void (*event_aio_handler_t)(struct event_context *, struct aio_event *,
                                    int, void *);
 
 #ifdef _SAMBA_BUILD_
-struct event_context *s4_event_context_init_byname(TALLOC_CTX *mem_ctx, const char *name);
 struct event_context *s4_event_context_init(TALLOC_CTX *mem_ctx);
 #endif
 
index 70b85d47e406a34a14b58512bdb58dc1f52e0a17..233844f02466a23170219d32f227adfb284024ed 100644 (file)
@@ -43,9 +43,9 @@ int ev_set_debug(struct event_context *ev,
 /*
   debug function for ev_set_debug_stderr
 */
-static void ev_debug_stderr(void *context, enum ev_debug_level level,
+void ev_debug_stderr(void *context, enum ev_debug_level level,
                            const char *fmt, va_list ap) PRINTF_ATTRIBUTE(3,0);
-static void ev_debug_stderr(void *context, enum ev_debug_level level,
+void ev_debug_stderr(void *context, enum ev_debug_level level,
                            const char *fmt, va_list ap)
 {
        if (level <= EV_DEBUG_WARNING) {
@@ -63,13 +63,18 @@ int ev_set_debug_stderr(struct event_context *ev)
 }
 
 /*
-  log a message
+ * log a message
+ *
+ * The default debug action is to ignore debugging messages.
+ * This is the most appropriate action for a library.
+ * Applications using the library must decide where to
+ * redirect debugging messages
 */
 void ev_debug(struct event_context *ev, enum ev_debug_level level, const char *fmt, ...)
 {
        va_list ap;
        if (ev->debug_ops.debug == NULL) {
-               ev_set_debug_stderr(ev);
+               return;
        }
        va_start(ap, fmt);
        ev->debug_ops.debug(ev->debug_ops.context, level, fmt, ap);
index edf92dba223855dcb31d58dc0756a947d1452207..134f899cf8983822cfdc5fbaa25e8706d79f39f6 100644 (file)
@@ -55,3 +55,54 @@ NTSTATUS s4_events_aio_init(void)
        return NT_STATUS_OK;
 }
 #endif
+
+/*
+  this is used to catch debug messages from events
+*/
+static void ev_wrap_debug(void *context, enum ev_debug_level level,
+                         const char *fmt, va_list ap)  PRINTF_ATTRIBUTE(3,0);
+
+static void ev_wrap_debug(void *context, enum ev_debug_level level,
+                         const char *fmt, va_list ap)
+{
+       int samba_level = -1;
+       char *s = NULL;
+       switch (level) {
+       case EV_DEBUG_FATAL:
+               samba_level = 0;
+               break;
+       case EV_DEBUG_ERROR:
+               samba_level = 1;
+               break;
+       case EV_DEBUG_WARNING:
+               samba_level = 2;
+               break;
+       case EV_DEBUG_TRACE:
+               samba_level = 5;
+               break;
+
+       };
+       vasprintf(&s, fmt, ap);
+       if (!s) return;
+       DEBUG(samba_level, ("events: %s\n", s));
+       free(s);
+}
+
+/*
+  create a event_context structure. This must be the first events
+  call, and all subsequent calls pass this event_context as the first
+  element. Event handlers also receive this as their first argument.
+
+  This samba4 specific call sets the samba4 debug handler.
+*/
+struct event_context *s4_event_context_init(TALLOC_CTX *mem_ctx)
+{
+       struct event_context *ev;
+
+       ev = event_context_init_byname(mem_ctx, NULL);
+       if (ev) {
+               ev_set_debug(ev, ev_wrap_debug, NULL);
+       }
+       return ev;
+}
+
index 6b50b2f5eba73a050f243d6d745c078a66a7cfb1..478df3662dfe75edbf493f71ece301bd82e1bd38 100644 (file)
@@ -758,12 +758,12 @@ static int ildb_connect(struct ldb_context *ldb, const char *url,
        module->private_data    = ildb;
        ildb->module            = module;
 
-       event_ctx = ldb_get_opaque(ldb, "EventContext");
+       event_ctx = ldb_get_event_context(ldb);
 
        /* FIXME: We must make the event context an explicit parameter, but we
         * need to build the events library separately first. Hack a new event
-        * context so that CMD line utilities work until we have libevents for
-        * standalone builds ready */
+        * context so that CMD line utilities work until we have them all
+        * converted */
        if (event_ctx == NULL) {
                event_ctx = event_context_init(NULL);
        }
index 41c9c82b1f3076b4b4272a04858f0286fd18db2e..621a2fe3494232beda544036ee3a55d8c183fc08 100644 (file)
@@ -76,7 +76,7 @@ PyObject *py_messaging_connect(PyTypeObject *self, PyObject *args, PyObject *kwa
 
        ret->mem_ctx = talloc_new(NULL);
 
-       ev = event_context_init(ret->mem_ctx);
+       ev = s4_event_context_init(ret->mem_ctx);
 
        if (messaging_path == NULL) {
                messaging_path = lp_messaging_path(ret, global_loadparm);
@@ -330,7 +330,7 @@ PyObject *py_irpc_connect(PyTypeObject *self, PyObject *args, PyObject *kwargs)
 
        ret->server_name = server;
 
-       ev = event_context_init(ret->mem_ctx);
+       ev = s4_event_context_init(ret->mem_ctx);
 
        if (messaging_path == NULL) {
                messaging_path = lp_messaging_path(ret, global_loadparm);
index e939e4101d03a7ad17ebf56490e575119b92c797..3fc34b1fe304682c690bbebf66943a96cf9a3c05 100644 (file)
@@ -3486,7 +3486,7 @@ SWIGINTERN PyObject *_wrap_hive_key(PyObject *SWIGUNUSEDPARM(self), PyObject *ar
   
   arg3 = NULL;
   arg4 = NULL;
-  arg5 = event_context_init(NULL);
+  arg5 = s4_event_context_init(NULL);
   arg6 = loadparm_init(NULL);
   arg1 = NULL;
   arg7 = &tmp7;
@@ -3574,7 +3574,7 @@ SWIGINTERN PyObject *_wrap_open_ldb(PyObject *SWIGUNUSEDPARM(self), PyObject *ar
   
   arg3 = NULL;
   arg4 = NULL;
-  arg5 = event_context_init(NULL);
+  arg5 = s4_event_context_init(NULL);
   arg6 = loadparm_init(NULL);
   arg1 = NULL;
   arg7 = &tmp7;
@@ -3735,7 +3735,7 @@ SWIGINTERN PyObject *_wrap_open_samba(PyObject *SWIGUNUSEDPARM(self), PyObject *
     (char *) "ev_ctx",(char *) "lp_ctx",(char *) "session_info",(char *) "credentials", NULL 
   };
   
-  arg3 = event_context_init(NULL);
+  arg3 = s4_event_context_init(NULL);
   arg4 = loadparm_init(NULL);
   arg5 = NULL;
   arg6 = NULL;
index 9b49799bed90f7b7003cd492d8711d868c61ea75..240c582340aab95ec390ea6f13cba4b6ab040726 100644 (file)
@@ -118,7 +118,7 @@ int main(int argc, const char **argv)
 
        }
 
-       ev_ctx = event_context_init(NULL);
+       ev_ctx = s4_event_context_init(NULL);
 
        h1 = open_backend(pc, ev_ctx, cmdline_lp_ctx, backend1, remote1);
        if (h1 == NULL)
index 9285459d8501db55b3fecbbaeb1525e5a1567ee7..1170fbadb432e69d491ff3e753b4eab67edab359 100644 (file)
@@ -49,7 +49,7 @@ int main(int argc, char **argv)
        while((opt = poptGetNextOpt(pc)) != -1) {
        }
 
-       ev = event_context_init(NULL);
+       ev = s4_event_context_init(NULL);
 
        if (remote) {
                h = reg_common_open_remote (remote, cmdline_lp_ctx, cmdline_credentials);
index 80eafcc4a29a69edfed366c5293b53f0cbc77956..4e859df3f60c7f8effbe02700518983ed15f4dab 100644 (file)
@@ -517,7 +517,7 @@ int main(int argc, char **argv)
 
        ctx = talloc_zero(NULL, struct regshell_context);
 
-       ev_ctx = event_context_init(ctx);
+       ev_ctx = s4_event_context_init(ctx);
 
        if (remote != NULL) {
                ctx->registry = reg_common_open_remote(remote, cmdline_lp_ctx, 
index 440399f7645470f8e761a63904a6e13816c6cf6f..daca6957a1aa47ed56152776cabff4e0250c866a 100644 (file)
@@ -129,7 +129,7 @@ int main(int argc, char **argv)
        while((opt = poptGetNextOpt(pc)) != -1) {
        }
 
-       ev_ctx = event_context_init(NULL);
+       ev_ctx = s4_event_context_init(NULL);
 
        if (remote != NULL) {
                h = reg_common_open_remote(remote, cmdline_lp_ctx, cmdline_credentials);
index 626a63ac4817678583d11c1a4f8180553059fc95..7978bfef904711a0a9a9edfada3b1a1f1d1225a6 100644 (file)
@@ -47,7 +47,7 @@ static PyObject *py_nbt_node_init(PyObject *self, PyObject *args, PyObject *kwar
        if (ret->mem_ctx == NULL)
                return NULL;
 
-       ev = event_context_init(ret->mem_ctx);
+       ev = s4_event_context_init(ret->mem_ctx);
        ret->socket = nbt_name_socket_init(ret->mem_ctx, ev, lp_iconv_convenience(global_loadparm)); 
        return (PyObject *)ret;
 }
index de8e6ba1e4ce79fbcd1fdfa4e9d58006aaa8b32a..a3ea079b83d9cc3dc6915ac97cdf33fab65a6501 100644 (file)
@@ -2621,7 +2621,7 @@ SWIGINTERN PyObject *_wrap_smbcli_sock_connect_byname(PyObject *SWIGUNUSEDPARM(s
     (char *) "host",(char *) "ports",(char *) "resolve_ctx",(char *) "event_ctx", NULL 
   };
   
-  arg5 = event_context_init(NULL);
+  arg5 = s4_event_context_init(NULL);
   arg3 = NULL;
   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|O:smbcli_sock_connect_byname",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
   res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
index 443da299c7ca7d915c603d4321a96deb10008bcb..3736454fa0aa8e28d7946cad0e2d653598564b99 100644 (file)
@@ -47,7 +47,7 @@ static PyObject *py_net_join(PyObject *cls, PyObject *args, PyObject *kwargs)
 
        /* FIXME: we really need to get a context from the caller or we may end
         * up with 2 event contexts */
-       ev = event_context_init(NULL);
+       ev = s4_event_context_init(NULL);
        mem_ctx = talloc_new(ev);
 
        libnet_ctx = py_net_ctx(cls, ev);
index d8344be511f081ee01dcf06d46f712c0619048c6..a59f355d436411732f819969808d59e4777bbac4 100644 (file)
@@ -336,7 +336,7 @@ static PyObject *dcerpc_interface_new(PyTypeObject *self, PyObject *args, PyObje
        }
        ret = PyObject_New(dcerpc_InterfaceObject, &dcerpc_InterfaceType);
 
-       event_ctx = event_context_init(mem_ctx);
+       event_ctx = s4_event_context_init(mem_ctx);
 
        /* Create a dummy interface table struct. TODO: In the future, we should rather just allow 
         * connecting without requiring an interface table.
index 839c7209d2b47502f099af951ffb328a8860e99c..2ffb724a6c63539a438a86b955ed23dc852b6cfd 100644 (file)
@@ -115,7 +115,7 @@ static void prefork_new_task(struct event_context *ev,
        pid = getpid();
 
        /* This is now the child code. We need a completely new event_context to work with */
-       ev2 = event_context_init(NULL);
+       ev2 = s4_event_context_init(NULL);
 
        /* the service has given us a private pointer that
           encapsulates the context it needs for this new connection -
@@ -173,7 +173,7 @@ static void prefork_new_task(struct event_context *ev,
        talloc_free(ev2);
        
        /* But we need a events system to handle reaping children */
-       ev_parent = event_context_init(NULL);
+       ev_parent = s4_event_context_init(NULL);
        
        /* TODO: Handle some events... */
        
index 820859400e7e0ef503c20dd8711b2779a494bd6d..3f2936bb2647f6a30227722ceae8325a2bf037f1 100644 (file)
@@ -92,7 +92,7 @@ static void standard_accept_connection(struct event_context *ev,
        pid = getpid();
 
        /* This is now the child code. We need a completely new event_context to work with */
-       ev2 = event_context_init(NULL);
+       ev2 = s4_event_context_init(NULL);
 
        /* the service has given us a private pointer that
           encapsulates the context it needs for this new connection -
@@ -161,7 +161,7 @@ static void standard_new_task(struct event_context *ev,
        pid = getpid();
 
        /* This is now the child code. We need a completely new event_context to work with */
-       ev2 = event_context_init(NULL);
+       ev2 = s4_event_context_init(NULL);
 
        /* the service has given us a private pointer that
           encapsulates the context it needs for this new connection -
index 5a45cdfeac6e6bee2977007031f1abcf1393190a..540d956420045771be1bf83e30a1689d0f1df4b9 100644 (file)
@@ -77,7 +77,7 @@ static void thread_accept_connection(struct event_context *ev,
        struct new_conn_state *state;
        struct event_context *ev2;
 
-       ev2 = event_context_init(ev);
+       ev2 = s4_event_context_init(ev);
        if (ev2 == NULL) return;
 
        state = talloc(ev2, struct new_conn_state);
@@ -160,7 +160,7 @@ static void thread_new_task(struct event_context *ev,
        struct new_task_state *state;
        struct event_context *ev2;
 
-       ev2 = event_context_init(ev);
+       ev2 = s4_event_context_init(ev);
        if (ev2 == NULL) return;
 
        state = talloc(ev2, struct new_task_state);
index c1c8b6368f6422b354a2ecaeef9535c388105316..74c87c68a447d45d3f1c8cd189ff53c1d6e5690a 100644 (file)
@@ -313,7 +313,7 @@ static int binary_smbd_main(const char *binary_name, int argc, const char *argv[
        
        /* the event context is the top level structure in smbd. Everything else
           should hang off that */
-       event_ctx = event_context_init(talloc_autofree_context());
+       event_ctx = s4_event_context_init(talloc_autofree_context());
 
        if (event_ctx == NULL) {
                DEBUG(0,("Initializing event context failed\n"));
index 15cf32196533e7f0bcda9c27a8c43b089165ed24..af5a95e7517f8f8d0416f5ebce8b4deaf2a9555a 100644 (file)
@@ -3219,7 +3219,7 @@ static bool split_unc_name(const char *unc, char **server, char **share)
 
        printf("seed=%u\n", options.seed);
 
-       ev = event_context_init(talloc_autofree_context());
+       ev = s4_event_context_init(talloc_autofree_context());
 
        gensec_init(lp_ctx);
 
index 4a0dfc2a6f10eff20ff35e3c97eafed02f012bcc..9c7bffb6f4c99ce286fa084b7e46de7da57de0ff 100644 (file)
@@ -637,7 +637,7 @@ static void usage(poptContext pc)
                servers[1] = servers[0];
        }
 
-       ev = event_context_init(talloc_autofree_context());
+       ev = s4_event_context_init(talloc_autofree_context());
 
        gensec_init(lp_ctx);
 
index 1784a0a729490c11668b311dd20c845b2379b914..e6c4728f0ddf854aba43b39ff2af1371a6a86f8b 100644 (file)
@@ -550,7 +550,7 @@ static void usage(void)
        DEBUG(0,("seed=%u\n", seed));
        srandom(seed);
 
-       ev = event_context_init(talloc_autofree_context());
+       ev = s4_event_context_init(talloc_autofree_context());
 
        locking_init(1);
        lp_smbcli_options(lp_ctx, &options);
index 255d94382c207eecf8de6b15e08f6483ff352a7a..35e9a57fe82bd1fcb8956bf142cfbfd65e32e3a2 100644 (file)
@@ -355,7 +355,7 @@ static void usage(poptContext pc)
 
        lp_ctx = cmdline_lp_ctx;
 
-       ev = event_context_init(talloc_autofree_context());
+       ev = s4_event_context_init(talloc_autofree_context());
 
        gensec_init(lp_ctx);
 
index e1e84247b4b73491727c1394d6830c2e7548f45f..37d7d171caddb788287a64c12daefcca6d076f72 100644 (file)
@@ -689,7 +689,7 @@ int main(int argc,char *argv[])
                exit(1);
        }
 
-       torture = torture_context_init(event_context_init(NULL), ui_ops);
+       torture = torture_context_init(s4_event_context_init(NULL), ui_ops);
        if (basedir != NULL) {
                if (basedir[0] != '/') {
                        fprintf(stderr, "Please specify an absolute path to --basedir\n");
index a87b2665681fa3c33b25f1e4dbe9838e7fb51934..1c834fe4f09da6ccd2e83424dc8dfa67baddbbdf 100644 (file)
@@ -185,7 +185,7 @@ static int binary_net(int argc, const char **argv)
 
        dcerpc_init();
 
-       ev = event_context_init(NULL);
+       ev = s4_event_context_init(NULL);
        if (!ev) {
                d_printf("Failed to create an event context\n");
                exit(1);
index 980e06602d91f3be3c9faa6b599f3c17f1af45c5..a74ab5a42e8392fa7409d99f7dd58e8c9933534d 100644 (file)
@@ -359,7 +359,7 @@ int main(int argc, const char *argv[])
 
        load_interfaces(NULL, lp_interfaces(cmdline_lp_ctx), &ifaces);
 
-       ev = event_context_init(talloc_autofree_context());
+       ev = s4_event_context_init(talloc_autofree_context());
 
        while (poptPeekArg(pc)) {
                const char *name = poptGetArg(pc);
index 95029deffa77aee114d8963c8d45f4e75c7e7a76..6d62968b05467703cc47110e4d26c3907cf4515c 100644 (file)
@@ -462,7 +462,7 @@ static void manage_gensec_request(enum stdio_helper_mode stdio_helper_mode,
                return;
        }
 
-       ev = event_context_init(state);
+       ev = s4_event_context_init(state);
        if (!ev) {
                exit(1);
        }