Mercurial > hg > nginx
comparison src/http/modules/ngx_http_limit_zone_module.c @ 1029:ce08bc4cb97b
ngx_strn2cmp() > ngx_memn2cmp()
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Fri, 12 Jan 2007 21:58:02 +0000 |
parents | 38be15c1379a |
children | defdce84b172 |
comparison
equal
deleted
inserted
replaced
1028:af57bfd77b7f | 1029:ce08bc4cb97b |
---|---|
177 /* hash == node->key */ | 177 /* hash == node->key */ |
178 | 178 |
179 do { | 179 do { |
180 lz = (ngx_http_limit_zone_node_t *) &node->color; | 180 lz = (ngx_http_limit_zone_node_t *) &node->color; |
181 | 181 |
182 rc = ngx_strn2cmp(lz->data, vv->data, (size_t) lz->len, len); | 182 rc = ngx_memn2cmp(lz->data, vv->data, (size_t) lz->len, len); |
183 | 183 |
184 if (rc == 0) { | 184 if (rc == 0) { |
185 if ((ngx_uint_t) lz->conn < lzcf->conn) { | 185 if ((ngx_uint_t) lz->conn < lzcf->conn) { |
186 lz->conn++; | 186 lz->conn++; |
187 goto done; | 187 goto done; |
264 } else { /* node->key == temp->key */ | 264 } else { /* node->key == temp->key */ |
265 | 265 |
266 lzn = (ngx_http_limit_zone_node_t *) &node->color; | 266 lzn = (ngx_http_limit_zone_node_t *) &node->color; |
267 lznt = (ngx_http_limit_zone_node_t *) &temp->color; | 267 lznt = (ngx_http_limit_zone_node_t *) &temp->color; |
268 | 268 |
269 if (ngx_strn2cmp(lzn->data, lznt->data, lzn->len, lznt->len) < 0) { | 269 if (ngx_memn2cmp(lzn->data, lznt->data, lzn->len, lznt->len) < 0) { |
270 | 270 |
271 if (temp->left == sentinel) { | 271 if (temp->left == sentinel) { |
272 temp->left = node; | 272 temp->left = node; |
273 break; | 273 break; |
274 } | 274 } |