]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
doveadm dump: Allow doveadm_cmd_dump.test() to be NULL
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Fri, 22 Dec 2017 13:11:45 +0000 (15:11 +0200)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Wed, 3 Jan 2018 10:40:29 +0000 (12:40 +0200)
This means that there's no auto-detection for the dump type.

src/doveadm/doveadm-dump.c

index ea70f94f0efe944b176c39e31290643f27bd9d8d..1312b8bf6088be45cafc1eac4990fefdb8fc6d84 100644 (file)
@@ -33,7 +33,7 @@ dump_find_test(const char *path)
        const struct doveadm_cmd_dump *const *dumpp;
 
        array_foreach(&dumps, dumpp) {
-               if ((*dumpp)->test(path))
+               if ((*dumpp)->test != NULL && (*dumpp)->test(path))
                        return *dumpp;
        }
        return NULL;