Fix up the "reg_common_open_remote" call
[ira/wip.git] / source4 / lib / registry / tools / regpatch.c
index 71837d180791d926f2ce00c804293842bde4e371..add59a5e64fd0fbb4ef22b383e6bf29ea62ebadf 100644 (file)
@@ -23,8 +23,8 @@
 #include "lib/registry/registry.h"
 #include "lib/cmdline/popt_common.h"
 #include "lib/registry/tools/common.h"
-#include "lib/registry/patchfile.h"
 #include "param/param.h"
+#include "events/events.h"
 
 int main(int argc, char **argv)
 {
@@ -34,6 +34,7 @@ int main(int argc, char **argv)
        struct registry_context *h;
        const char *file = NULL;
        const char *remote = NULL;
+       struct event_context *ev_ctx;
        struct poptOption long_options[] = {
                POPT_AUTOHELP
                {"remote", 'R', POPT_ARG_STRING, &remote, 0, "connect to specified remote server", NULL},
@@ -48,10 +49,12 @@ int main(int argc, char **argv)
        while((opt = poptGetNextOpt(pc)) != -1) {
        }
 
+       ev_ctx = s4_event_context_init(NULL);
+
        if (remote) {
-               h = reg_common_open_remote (remote, cmdline_lp_ctx, cmdline_credentials);
+               h = reg_common_open_remote (remote, ev_ctx, cmdline_lp_ctx, cmdline_credentials);
        } else {
-               h = reg_common_open_local (cmdline_credentials, cmdline_lp_ctx);
+               h = reg_common_open_local (cmdline_credentials, ev_ctx, cmdline_lp_ctx);
        }
 
        if (h == NULL)