~ubuntu-branches/debian/stretch/haproxy/stretch

« back to all changes in this revision

Viewing changes to src/proto_tcp.c

  • Committer: Bazaar Package Importer
  • Author(s): Christo Buschek
  • Date: 2011-03-11 12:41:59 UTC
  • mfrom: (1.1.10 upstream)
  • Revision ID: james.westby@ubuntu.com-20110311124159-9foyp4juf1ilqipo
Tags: 1.4.13-1
* New maintainer upload (Closes: #615246)
* New upstream release
* Standards-version goes 3.9.1 (no change)
* Added patch bashism (Closes: #581109)
* Added a README.source file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 * AF_INET/AF_INET6 SOCK_STREAM protocol layer (tcp)
3
3
 *
4
 
 * Copyright 2000-2008 Willy Tarreau <w@1wt.eu>
 
4
 * Copyright 2000-2010 Willy Tarreau <w@1wt.eu>
5
5
 *
6
6
 * This program is free software; you can redistribute it and/or
7
7
 * modify it under the terms of the GNU General Public License
662
662
         * - if one rule returns KO, then return KO
663
663
         */
664
664
 
665
 
        if (req->flags & BF_SHUTR || !s->fe->tcp_req.inspect_delay || tick_is_expired(req->analyse_exp, now_ms))
 
665
        if (req->flags & (BF_SHUTR|BF_FULL) || !s->fe->tcp_req.inspect_delay || tick_is_expired(req->analyse_exp, now_ms))
666
666
                partial = 0;
667
667
        else
668
668
                partial = ACL_PARTIAL;
796
796
 
797
797
        if (!*args[1]) {
798
798
                snprintf(err, errlen, "missing argument for '%s' in %s '%s'",
799
 
                         args[0], proxy_type_str(proxy), curpx->id);
 
799
                         args[0], proxy_type_str(curpx), curpx->id);
800
800
                return -1;
801
801
        }
802
802
 
809
809
 
810
810
                if (!(curpx->cap & PR_CAP_FE)) {
811
811
                        snprintf(err, errlen, "%s %s will be ignored because %s '%s' has no %s capability",
812
 
                                 args[0], args[1], proxy_type_str(proxy), curpx->id,
 
812
                                 args[0], args[1], proxy_type_str(curpx), curpx->id,
813
813
                                 "frontend");
814
814
                        return 1;
815
815
                }
817
817
                if (!*args[2] || (ptr = parse_time_err(args[2], &val, TIME_UNIT_MS))) {
818
818
                        retlen = snprintf(err, errlen,
819
819
                                          "'%s %s' expects a positive delay in milliseconds, in %s '%s'",
820
 
                                          args[0], args[1], proxy_type_str(proxy), curpx->id);
 
820
                                          args[0], args[1], proxy_type_str(curpx), curpx->id);
821
821
                        if (ptr && retlen < errlen)
822
822
                                retlen += snprintf(err+retlen, errlen - retlen,
823
823
                                                   " (unexpected character '%c')", *ptr);
826
826
 
827
827
                if (curpx->tcp_req.inspect_delay) {
828
828
                        snprintf(err, errlen, "ignoring %s %s (was already defined) in %s '%s'",
829
 
                                 args[0], args[1], proxy_type_str(proxy), curpx->id);
 
829
                                 args[0], args[1], proxy_type_str(curpx), curpx->id);
830
830
                        return 1;
831
831
                }
832
832
                curpx->tcp_req.inspect_delay = val;