diff options
Diffstat (limited to 'src/comp.c')
-rw-r--r-- | src/comp.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -655,31 +655,37 @@ component_verify (struct component *comp, grecs_locus_t *locus) | |||
655 | COMPERR (grecs_error, "%s", _("max-instances ignored")); | 655 | COMPERR (grecs_error, "%s", _("max-instances ignored")); |
656 | else | 656 | else |
657 | comp->max_instances = 1; | 657 | comp->max_instances = 1; |
658 | } | 658 | } |
659 | } | 659 | } |
660 | else if (comp->flags & CF_WAIT) | 660 | else if (comp->flags & CF_WAIT) |
661 | { | 661 | { |
662 | /* TRANSLATORS: `wait' is a keywords, do not translate. */ | 662 | /* TRANSLATORS: `wait' is a keywords, do not translate. */ |
663 | COMPERR (grecs_error, "%s", _("wait is useless in this mode")); | 663 | COMPERR (grecs_error, "%s", _("wait is useless in this mode")); |
664 | comp->flags &= ~CF_WAIT; | 664 | comp->flags &= ~CF_WAIT; |
665 | } | 665 | } |
666 | 666 | ||
667 | if (comp->mode != pies_comp_exec | 667 | switch (comp->mode) |
668 | && comp->redir[RETR_OUT].type != redir_null) | 668 | { |
669 | case pies_comp_accept: | ||
670 | case pies_comp_inetd: | ||
671 | if (comp->redir[RETR_OUT].type != redir_null) | ||
669 | { | 672 | { |
670 | COMPERR (grecs_error, | 673 | COMPERR (grecs_error, |
671 | "%s", _("stdout redirection invalid in this mode")); | 674 | "%s", _("stdout redirection invalid in this mode")); |
672 | comp->redir[RETR_OUT].type = redir_null; | 675 | comp->redir[RETR_OUT].type = redir_null; |
673 | } | 676 | } |
677 | default: | ||
678 | break; | ||
679 | } | ||
674 | 680 | ||
675 | for (i = RETR_OUT; i <= RETR_ERR; i++) | 681 | for (i = RETR_OUT; i <= RETR_ERR; i++) |
676 | { | 682 | { |
677 | if (comp->redir[i].type == redir_file | 683 | if (comp->redir[i].type == redir_file |
678 | && comp->redir[i].v.file[0] != '/') | 684 | && comp->redir[i].v.file[0] != '/') |
679 | { | 685 | { |
680 | if (comp->dir) | 686 | if (comp->dir) |
681 | { | 687 | { |
682 | char *p = mkfilename (comp->dir, comp->redir[i].v.file, NULL); | 688 | char *p = mkfilename (comp->dir, comp->redir[i].v.file, NULL); |
683 | free (comp->redir[i].v.file); | 689 | free (comp->redir[i].v.file); |
684 | comp->redir[i].v.file = p; | 690 | comp->redir[i].v.file = p; |
685 | } | 691 | } |