Mercurial > hg > nginx
comparison src/mail/ngx_mail.c @ 1209:c6c33f81fd79
use stable search where it is required
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 21 May 2007 14:09:12 +0000 |
parents | 68f30ab68bb7 |
children | 0d57c150115b |
comparison
equal
deleted
inserted
replaced
1208:5eae5751507f | 1209:c6c33f81fd79 |
---|---|
9 #include <ngx_event.h> | 9 #include <ngx_event.h> |
10 #include <ngx_mail.h> | 10 #include <ngx_mail.h> |
11 | 11 |
12 | 12 |
13 static char *ngx_mail_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf); | 13 static char *ngx_mail_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf); |
14 static int ngx_libc_cdecl ngx_mail_cmp_conf_in_addrs(const void *one, | 14 static int ngx_mail_cmp_conf_in_addrs(const void *one, const void *two); |
15 const void *two); | |
16 | 15 |
17 | 16 |
18 ngx_uint_t ngx_mail_max_module; | 17 ngx_uint_t ngx_mail_max_module; |
19 | 18 |
20 | 19 |
267 /* AF_INET only */ | 266 /* AF_INET only */ |
268 | 267 |
269 in_port = in_ports.elts; | 268 in_port = in_ports.elts; |
270 for (p = 0; p < in_ports.nelts; p++) { | 269 for (p = 0; p < in_ports.nelts; p++) { |
271 | 270 |
272 ngx_qsort(in_port[p].addrs.elts, (size_t) in_port[p].addrs.nelts, | 271 ngx_sort(in_port[p].addrs.elts, (size_t) in_port[p].addrs.nelts, |
273 sizeof(ngx_mail_conf_in_addr_t), ngx_mail_cmp_conf_in_addrs); | 272 sizeof(ngx_mail_conf_in_addr_t), ngx_mail_cmp_conf_in_addrs); |
274 | 273 |
275 in_addr = in_port[p].addrs.elts; | 274 in_addr = in_port[p].addrs.elts; |
276 last = in_port[p].addrs.nelts; | 275 last = in_port[p].addrs.nelts; |
277 | 276 |
278 /* | 277 /* |
385 | 384 |
386 return NGX_CONF_OK; | 385 return NGX_CONF_OK; |
387 } | 386 } |
388 | 387 |
389 | 388 |
390 static int ngx_libc_cdecl | 389 static int |
391 ngx_mail_cmp_conf_in_addrs(const void *one, const void *two) | 390 ngx_mail_cmp_conf_in_addrs(const void *one, const void *two) |
392 { | 391 { |
393 ngx_mail_conf_in_addr_t *first, *second; | 392 ngx_mail_conf_in_addr_t *first, *second; |
394 | 393 |
395 first = (ngx_mail_conf_in_addr_t *) one; | 394 first = (ngx_mail_conf_in_addr_t *) one; |