]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-http: test-http-payload: Added -D option to easily enable debug mode.
authorStephan Bosch <stephan@dovecot.fi>
Sun, 22 May 2016 17:16:42 +0000 (19:16 +0200)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 20 Jun 2016 00:25:14 +0000 (03:25 +0300)
src/lib-http/test-http-payload.c

index 6e85be8b04efc216cfc653859f753b60911cda62..3dc4b865c48201e4418cb6af43cf2841fb79a6cc 100644 (file)
@@ -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;