Mercurial > dovecot > core-2.2
changeset 20357:a7184e5a41d7
lib-http: test-http-payload: Added -D option to easily enable debug mode.
author | Stephan Bosch <stephan@dovecot.fi> |
---|---|
date | Sun, 22 May 2016 19:16:42 +0200 |
parents | 3073a9e2ab8a |
children | 075b812a6e6e |
files | src/lib-http/test-http-payload.c |
diffstat | 1 files changed, 13 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-http/test-http-payload.c Mon May 23 03:16:07 2016 +0200 +++ b/src/lib-http/test-http-payload.c Sun May 22 19:16:42 2016 +0200 @@ -1381,8 +1381,20 @@ * 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;