~ubuntu-branches/ubuntu/precise/haproxy/precise-proposed

« back to all changes in this revision

Viewing changes to src/proto_tcp.c

  • Committer: Bazaar Package Importer
  • Author(s): Arnaud Cornet
  • Date: 2009-10-19 22:31:45 UTC
  • mfrom: (1.1.7 upstream) (2.1.6 sid)
  • Revision ID: james.westby@ubuntu.com-20091019223145-259fs24dejjixo1f
Tags: 1.3.22-1
New upstream bugfix release

Show diffs side-by-side

added added

removed removed

Lines of Context:
505
505
                pol = ACL_COND_NONE;
506
506
                cond = NULL;
507
507
 
508
 
                if (!strcmp(args[3], "if"))
 
508
                if (!*args[3])
 
509
                        pol = ACL_COND_NONE;
 
510
                else if (!strcmp(args[3], "if"))
509
511
                        pol = ACL_COND_IF;
510
512
                else if (!strcmp(args[3], "unless"))
511
513
                        pol = ACL_COND_UNLESS;
 
514
                else {
 
515
                        retlen = snprintf(err, errlen,
 
516
                                          "'%s %s %s' only accepts 'if' or 'unless', in %s '%s' (was '%s')",
 
517
                                          args[0], args[1], args[2], proxy_type_str(curpx), curpx->id, args[3]);
 
518
                        return -1;
 
519
                }
512
520
 
513
521
                /* Note: we consider "if TRUE" when there is no condition */
514
522
                if (pol != ACL_COND_NONE &&