comparison src/event/ngx_event_connect.h @ 318:fc223117327f NGINX_0_6_3

nginx 0.6.3 *) Feature: the "proxy_store" and "fastcgi_store" directives. *) Bugfix: a segmentation fault might occur in worker process if the "auth_http_header" directive was used. Thanks to Maxim Dounin. *) Bugfix: a segmentation fault occurred in worker process if the CRAM-MD5 authentication method was used, but it was not enabled. *) Bugfix: a segmentation fault might occur in worker process when the HTTPS protocol was used in the "proxy_pass" directive. *) Bugfix: a segmentation fault might occur in worker process if the eventport method was used. *) Bugfix: the "proxy_ignore_client_abort" and "fastcgi_ignore_client_abort" directives did not work; bug appeared in 0.5.13.
author Igor Sysoev <http://sysoev.ru>
date Thu, 12 Jul 2007 00:00:00 +0400
parents 0effe91f6083
children c04fa65fe604
comparison
equal deleted inserted replaced
317:fcdf0e42c859 318:fc223117327f
11 #include <ngx_config.h> 11 #include <ngx_config.h>
12 #include <ngx_core.h> 12 #include <ngx_core.h>
13 #include <ngx_event.h> 13 #include <ngx_event.h>
14 14
15 15
16 #define NGX_PEER_KEEPALIVE 1 16 #define NGX_PEER_KEEPALIVE 1
17 #define NGX_PEER_NEXT 2 17 #define NGX_PEER_NEXT 2
18 #define NGX_PEER_FAILED 4 18 #define NGX_PEER_FAILED 4
19 19
20 20
21 typedef struct ngx_peer_connection_s ngx_peer_connection_t; 21 typedef struct ngx_peer_connection_s ngx_peer_connection_t;
22 22
23 typedef ngx_int_t (*ngx_event_get_peer_pt)(ngx_peer_connection_t *pc, 23 typedef ngx_int_t (*ngx_event_get_peer_pt)(ngx_peer_connection_t *pc,
24 void *data); 24 void *data);
25 #if (NGX_SSL)
26 typedef void (*ngx_event_save_peer_pt)(ngx_peer_connection_t *pc, void *data);
27 #endif
28 typedef void (*ngx_event_free_peer_pt)(ngx_peer_connection_t *pc, void *data, 25 typedef void (*ngx_event_free_peer_pt)(ngx_peer_connection_t *pc, void *data,
29 ngx_uint_t state); 26 ngx_uint_t state);
27 #if (NGX_SSL)
28
29 typedef ngx_int_t (*ngx_event_set_peer_session_pt)(ngx_peer_connection_t *pc,
30 void *data);
31 typedef void (*ngx_event_save_peer_session_pt)(ngx_peer_connection_t *pc,
32 void *data);
33 #endif
30 34
31 35
32 struct ngx_peer_connection_s { 36 struct ngx_peer_connection_s {
33 ngx_connection_t *connection; 37 ngx_connection_t *connection;
34 38
35 struct sockaddr *sockaddr; 39 struct sockaddr *sockaddr;
36 socklen_t socklen; 40 socklen_t socklen;
37 ngx_str_t *name; 41 ngx_str_t *name;
38 42
39 ngx_uint_t tries; 43 ngx_uint_t tries;
40 44
41 ngx_event_get_peer_pt get; 45 ngx_event_get_peer_pt get;
42 ngx_event_free_peer_pt free; 46 ngx_event_free_peer_pt free;
43 void *data; 47 void *data;
44 48
45 #if (NGX_SSL) 49 #if (NGX_SSL)
46 ngx_ssl_session_t *ssl_session; 50 ngx_event_set_peer_session_pt set_session;
47 ngx_event_save_peer_pt save_session; 51 ngx_event_save_peer_session_pt save_session;
48 #endif 52 #endif
49 53
50 #if (NGX_THREADS) 54 #if (NGX_THREADS)
51 ngx_atomic_t *lock; 55 ngx_atomic_t *lock;
52 #endif 56 #endif
53 57
54 int rcvbuf; 58 int rcvbuf;
55 59
56 ngx_log_t *log; 60 ngx_log_t *log;
57 61
58 unsigned cached:1; 62 unsigned cached:1;
59 unsigned log_error:2; /* ngx_connection_log_error_e */ 63
64 /* ngx_connection_log_error_e */
65 unsigned log_error:2;
60 }; 66 };
61 67
62 68
63 ngx_int_t ngx_event_connect_peer(ngx_peer_connection_t *pc); 69 ngx_int_t ngx_event_connect_peer(ngx_peer_connection_t *pc);
64 ngx_int_t ngx_event_get_peer(ngx_peer_connection_t *pc, void *data); 70 ngx_int_t ngx_event_get_peer(ngx_peer_connection_t *pc, void *data);