changeset 22720:2c86355ae261

doveadm dump: Allow doveadm_cmd_dump.test() to be NULL This means that there's no auto-detection for the dump type.
author Timo Sirainen <timo.sirainen@dovecot.fi>
date Fri, 22 Dec 2017 15:11:45 +0200
parents b35916412f38
children cef6bd8535f0
files src/doveadm/doveadm-dump.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/doveadm/doveadm-dump.c	Fri Dec 22 15:10:00 2017 +0200
+++ b/src/doveadm/doveadm-dump.c	Fri Dec 22 15:11:45 2017 +0200
@@ -33,7 +33,7 @@
 	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;