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

« back to all changes in this revision

Viewing changes to include/proto/backend.h

  • Committer: Bazaar Package Importer
  • Author(s): Arnaud Cornet
  • Date: 2009-06-26 00:11:01 UTC
  • mfrom: (1.1.6 upstream) (2.1.4 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090626001101-qo261ke2mjh3d8cn
* New Upstream Version (Closes: #534583).
* Add contrib directory in docs

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
  include/proto/backend.h
3
3
  Functions prototypes for the backend.
4
4
 
5
 
  Copyright (C) 2000-2007 Willy Tarreau - w@1wt.eu
 
5
  Copyright (C) 2000-2008 Willy Tarreau - w@1wt.eu
6
6
  
7
7
  This library is free software; you can redistribute it and/or
8
8
  modify it under the terms of the GNU Lesser General Public
33
33
int assign_server_address(struct session *s);
34
34
int assign_server_and_queue(struct session *s);
35
35
int connect_server(struct session *s);
36
 
int srv_count_retry_down(struct session *t, int conn_err);
37
 
int srv_retryable_connect(struct session *t);
38
36
int srv_redispatch_connect(struct session *t);
39
37
int backend_parse_balance(const char **args, char *err,
40
38
                          int errlen, struct proxy *curproxy);
159
157
{
160
158
        unsigned long hash = 0;
161
159
        int c;
 
160
        int slashes = 0;
162
161
 
163
162
        if (px->lbprm.tot_weight == 0)
164
163
                return NULL;
166
165
        if (px->lbprm.map.state & PR_MAP_RECALC)
167
166
                recalc_server_map(px);
168
167
 
 
168
        if (px->uri_len_limit)
 
169
                uri_len = MIN(uri_len, px->uri_len_limit);
 
170
 
169
171
        while (uri_len--) {
170
172
                c = *uri++;
171
 
                if (c == '?')
 
173
                if (c == '/') {
 
174
                        slashes++;
 
175
                        if (slashes == px->uri_dirs_depth1) /* depth+1 */
 
176
                                break;
 
177
                }
 
178
                else if (c == '?')
172
179
                        break;
 
180
 
173
181
                hash = c + (hash << 6) + (hash << 16) - hash;
174
182
        }
175
183