Fix up the "reg_common_open_remote" call
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
Tue, 9 Sep 2008 16:03:54 +0000 (18:03 +0200)
committerMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
Tue, 9 Sep 2008 16:03:54 +0000 (18:03 +0200)
This fixes up the "reg_common_open_remote" call because it didn't work anymore without the event context.

source/lib/registry/tools/common.c
source/lib/registry/tools/regpatch.c
source/lib/registry/tools/regshell.c
source/lib/registry/tools/regtree.c

index 3ea780de60ae22f15702de95d7e9838601461eb6..f770f6a3cafd06a2244b5e91a910a246cc2778bb 100644 (file)
 #include "lib/registry/tools/common.h"
 
 struct registry_context *reg_common_open_remote(const char *remote,
+                                               struct event_context *ev_ctx,
                                                struct loadparm_context *lp_ctx,
                                                struct cli_credentials *creds)
 {
        struct registry_context *h = NULL;
        WERROR error;
 
-       error = reg_open_remote(&h, NULL, creds, lp_ctx, remote, NULL);
+       error = reg_open_remote(&h, NULL, creds, lp_ctx, remote, ev_ctx);
 
        if (!W_ERROR_IS_OK(error)) {
                fprintf(stderr, "Unable to open remote registry at %s:%s \n",
index 1170fbadb432e69d491ff3e753b4eab67edab359..add59a5e64fd0fbb4ef22b383e6bf29ea62ebadf 100644 (file)
@@ -34,7 +34,7 @@ int main(int argc, char **argv)
        struct registry_context *h;
        const char *file = NULL;
        const char *remote = NULL;
-       struct event_context *ev;
+       struct event_context *ev_ctx;
        struct poptOption long_options[] = {
                POPT_AUTOHELP
                {"remote", 'R', POPT_ARG_STRING, &remote, 0, "connect to specified remote server", NULL},
@@ -49,12 +49,12 @@ int main(int argc, char **argv)
        while((opt = poptGetNextOpt(pc)) != -1) {
        }
 
-       ev = s4_event_context_init(NULL);
+       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, ev, cmdline_lp_ctx);
+               h = reg_common_open_local (cmdline_credentials, ev_ctx, cmdline_lp_ctx);
        }
 
        if (h == NULL)
index ee8f366e6e29a152bbc43d07184ee09e479af100..98f7f02c38cec5e3340ddc5bfcd956640c6df2d7 100644 (file)
@@ -518,8 +518,8 @@ int main(int argc, char **argv)
        ev_ctx = s4_event_context_init(ctx);
 
        if (remote != NULL) {
-               ctx->registry = reg_common_open_remote(remote, cmdline_lp_ctx, 
-                                                      cmdline_credentials);
+               ctx->registry = reg_common_open_remote(remote, ev_ctx,
+                                        cmdline_lp_ctx, cmdline_credentials);
        } else if (file != NULL) {
                ctx->current = reg_common_open_file(file, ev_ctx, cmdline_lp_ctx, cmdline_credentials);
                if (ctx->current == NULL)
index daca6957a1aa47ed56152776cabff4e0250c866a..19e4a010b4319a3ed5a0655d53633c0b50e9c393 100644 (file)
@@ -132,7 +132,7 @@ int main(int argc, char **argv)
        ev_ctx = s4_event_context_init(NULL);
 
        if (remote != NULL) {
-               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 if (file != NULL) {
                start_key = reg_common_open_file(file, ev_ctx, cmdline_lp_ctx, cmdline_credentials);
        } else {