When calling openchangeclient with the --dump-data switch, it will
dump core, since the global_mapi_ctx pointer isn't initialised yet.
The fix is to wait until it's set before accessing it.

Andrew

Index: utils/openchangeclient.c
===================================================================
--- utils/openchangeclient.c    (revision 262)
+++ utils/openchangeclient.c    (working copy)
@@ -1844,10 +1844,6 @@
                lp_set_cmdline("log level", opt_debug);
        }

-       if (opt_dumpdata == true) {
-               global_mapi_ctx->dumpdata = true;
-       }
-
        /**
         * Initialize MAPI subsystem
         */
@@ -1858,6 +1854,10 @@
                exit (1);
        }

+       if (opt_dumpdata == true) {
+               global_mapi_ctx->dumpdata = true;
+       }
+
        /* If no profile is specified try to load the default one from
         * the database
         */
_______________________________________________
devel mailing list
[email protected]
http://mailman.openchange.org/listinfo/devel

Reply via email to