Mercurial > masqmail
comparison src/masqmail.c @ 290:792e0201c1b3
mark -qo (without argument) obsolete
Its behavior (online detect and send over the available route)
is included in -q. In the -qo case no local mail would be sent,
but why would be not want to do so? We might use -qo (without
arg) for something more useful in the future.
author | markus schnalke <meillo@marmaro.de> |
---|---|
date | Wed, 08 Dec 2010 18:00:22 -0300 |
parents | 84ea0b1fc8f8 |
children | f10a56dc7481 |
comparison
equal
deleted
inserted
replaced
289:bb3005ce0837 | 290:792e0201c1b3 |
---|---|
369 } | 369 } |
370 return ok; | 370 return ok; |
371 } | 371 } |
372 | 372 |
373 /* -qo, -q (without argument), or called as runq */ | 373 /* -qo, -q (without argument), or called as runq */ |
374 /* TODO: are -qo and -q exclusively or not? | |
375 And how is this related to being a daemon? */ | |
376 static int | 374 static int |
377 run_queue(gboolean do_runq, gboolean do_runq_online, char* route_name) | 375 run_queue(gboolean do_runq, gboolean do_runq_online, char* route_name) |
378 { | 376 { |
379 int ret; | 377 int ret; |
380 | 378 |
388 if (do_runq_online) { | 386 if (do_runq_online) { |
389 if (route_name) { | 387 if (route_name) { |
390 conf.online_detect = g_strdup("argument"); | 388 conf.online_detect = g_strdup("argument"); |
391 set_online_name(route_name); | 389 set_online_name(route_name); |
392 } | 390 } |
391 /* TODO: change behavior of `-qo without argument'? | |
392 Because that behavior is included in -q. */ | |
393 ret = queue_run_online(); | 393 ret = queue_run_online(); |
394 } | 394 } |
395 return ret; | 395 return ret; |
396 } | 396 } |
397 | 397 |
565 } else if (strncmp(opt, "qo", 2) == 0) { | 565 } else if (strncmp(opt, "qo", 2) == 0) { |
566 /* must be before the `q' check */ | 566 /* must be before the `q' check */ |
567 set_mode(MODE_RUNQUEUE); | 567 set_mode(MODE_RUNQUEUE); |
568 do_runq_online = TRUE; | 568 do_runq_online = TRUE; |
569 /* can be NULL, then we use online detection method */ | 569 /* can be NULL, then we use online detection method */ |
570 /* TODO: behavior might change if it is NULL */ | |
570 route_name = get_optarg(argv, &arg, opt+2); | 571 route_name = get_optarg(argv, &arg, opt+2); |
572 if (!route_name) { | |
573 fprintf(stderr, "Please do not use -qo without argument anymore; use -q instead.\n"); | |
574 fprintf(stderr, "The behavior for -qo without argument is likely to change.\n"); | |
575 } | |
571 | 576 |
572 } else if (strncmp(opt, "q", 1) == 0) { | 577 } else if (strncmp(opt, "q", 1) == 0) { |
573 /* must be after the `qo' check */ | 578 /* must be after the `qo' check */ |
574 gchar *optarg; | 579 gchar *optarg; |
575 | 580 |