summaryrefslogtreecommitdiffstats
path: root/lib/command_parse.c
diff options
context:
space:
mode:
authorChris Hall <chris.hall@highwayman.com>2011-09-06 23:59:17 +0100
committerChris Hall <chris.hall@highwayman.com>2011-09-06 23:59:17 +0100
commit73a45fd38a9bc7279eb67021b07092a00768b559 (patch)
treec77bdc05adf7979a1cb73d21974251d8bbf6a758 /lib/command_parse.c
parentbfca45143084f850dcfac2b14a090a6f008c8c96 (diff)
parent44b5aa5ca8b8a1620478c794dae11a7d71e9211e (diff)
downloadquagga-ex19b.tar.bz2
quagga-ex19b.tar.xz
Merge branch 'pipework' of /git/quagga.euro-ix into euro_ix_bex19b
Updated version to v0.99.18ex19b.
Diffstat (limited to 'lib/command_parse.c')
-rw-r--r--lib/command_parse.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/command_parse.c b/lib/command_parse.c
index 9204db70..54185428 100644
--- a/lib/command_parse.c
+++ b/lib/command_parse.c
@@ -3247,10 +3247,9 @@ static node_type_t cmd_auth_specials(cmd_context context, node_type_t target) ;
*
* - parsed->parts is what was found
*
- * - parsed->cmd->daemon => daemon
+ * NB: may be empty or comment only !
*
- * CMD_EMPTY => line is empty, except perhaps for comment
- * (iff parsing for execution)
+ * - parsed->cmd->daemon => daemon
*
* CMD_ERR_INCOMPLETE => "do" and nothing more
* (iff parsing for execution)
@@ -3317,13 +3316,10 @@ cmd_parse_command(cmd_parsed parsed, cmd_context context)
*/
if (((parsed->parts & cmd_part_command) == 0) && context->parse_execution)
{
- if ((parsed->parts & ~cmd_part_comment) == cmd_parts_none)
- return CMD_EMPTY ; /* accept empty */
-
if ((parsed->parts & cmd_part_do) != 0)
- return CMD_ERR_INCOMPLETE ; /* reject "do" alone */
+ return CMD_ERR_INCOMPLETE ; /* reject "do" alone */
- return CMD_SUCCESS ; /* accept pipes */
+ return CMD_SUCCESS ; /* accept pipes and empty */
} ;
/* Level 2 parsing