X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=test%2Frandom-corpus.c;h=8ae08971478a2a639b249a08b1fd96c1c432b8ec;hb=d9a2b900b6525874b913276af91840983d81b3f1;hp=d0354e3584082b0c1e1b55f307b56f131acfbb4a;hpb=df4c66f85d4aa05c462ad119c6dad3afa421f6f2;p=notmuch diff --git a/test/random-corpus.c b/test/random-corpus.c index d0354e35..8ae08971 100644 --- a/test/random-corpus.c +++ b/test/random-corpus.c @@ -122,7 +122,8 @@ const notmuch_opt_desc_t notmuch_shared_options[] = { const char *notmuch_requested_db_uuid = NULL; void -notmuch_process_shared_options (unused (const char *dummy)) +notmuch_process_shared_options (unused (notmuch_database_t *notmuch), + unused (const char *dummy)) { } @@ -141,7 +142,6 @@ main (int argc, char **argv) void *ctx = talloc_new (NULL); const char *config_path = NULL; - notmuch_config_t *config; notmuch_database_t *notmuch; int num_messages = 500; @@ -179,12 +179,12 @@ main (int argc, char **argv) exit (1); } - config = notmuch_config_open (ctx, config_path, false); - if (config == NULL) - return 1; - - if (notmuch_database_open (notmuch_config_get_database_path (config), - NOTMUCH_DATABASE_MODE_READ_WRITE, ¬much)) + if (notmuch_database_open_with_config (NULL, + NOTMUCH_DATABASE_MODE_READ_WRITE, + config_path, + NULL, + ¬much, + NULL)) return 1; srandom (seed);