Changeset 4561:ae63013cbffa in nginx
 Timestamp:
 03/28/12 06:50:23 (8 years ago)
 Branch:
 default
 Phase:
 public
 Convert:
 svn:c3fe7df17212e0118a91001109144009/trunk@4562
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

src/http/modules/ngx_http_split_clients_module.c
r4412 r4561 98 98 "http split: %uD %uD", hash, part[i].percent); 99 99 100 if (hash < part[i].percent ) {100 if (hash < part[i].percent  part[i].percent == 0) { 101 101 *v = part[i].value; 102 102 return NGX_OK; … … 112 112 { 113 113 char *rv; 114 uint32_t sum, last; 114 115 ngx_str_t *value, name; 115 ngx_uint_t i , sum, last;116 ngx_uint_t i; 116 117 ngx_conf_t save; 117 118 ngx_http_variable_t *var; … … 176 177 sum = part[i].percent ? sum + part[i].percent : 10000; 177 178 if (sum > 10000) { 178 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,179 "percent sum is more than 100%%");180 return NGX_CONF_ERROR;179 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, 180 "percent sum is more than 100%%"); 181 return NGX_CONF_ERROR; 181 182 } 182 183 183 184 if (part[i].percent) { 184 part[i].percent = (uint32_t) 185 (last + 0xffffffff / 10000 * part[i].percent); 186 } else { 187 part[i].percent = 0xffffffff; 188 } 189 190 last = part[i].percent; 185 last += part[i].percent * (uint64_t) 0xffffffff / 10000; 186 part[i].percent = last; 187 } 191 188 } 192 189
Note:
See TracChangeset
for help on using the changeset viewer.