From: Stephan Bosch Date: Sun, 22 May 2016 17:16:42 +0000 (+0200) Subject: lib-http: test-http-payload: Added -D option to easily enable debug mode. X-Git-Tag: 2.2.25.rc1~113 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5ad09b076d224d517d77020d3b821e5979881238;p=thirdparty%2Fdovecot%2Fcore.git lib-http: test-http-payload: Added -D option to easily enable debug mode. --- diff --git a/src/lib-http/test-http-payload.c b/src/lib-http/test-http-payload.c index 6e85be8b04..3dc4b865c4 100644 --- a/src/lib-http/test-http-payload.c +++ b/src/lib-http/test-http-payload.c @@ -1381,8 +1381,20 @@ static void (*test_functions[])(void) = { * Main */ -int main(void) +int main(int argc, char *argv[]) { + int c; + + while ((c = getopt(argc, argv, "D")) > 0) { + switch (c) { + case 'D': + debug = TRUE; + break; + default: + i_fatal("Usage: %s [-D]", argv[0]); + } + } + /* listen on localhost */ memset(&bind_ip, 0, sizeof(bind_ip)); bind_ip.family = AF_INET;