forked from yaoweibin/nginx_tcp_proxy_module
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtcp-1.7.10.patch
More file actions
53 lines (42 loc) · 2.02 KB
/
tcp-1.7.10.patch
File metadata and controls
53 lines (42 loc) · 2.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
diff -rupN nginx-1.7.10-original/src/core/ngx_log.c nginx-1.7.10/src/core/ngx_log.c
--- nginx-1.7.10-original/src/core/ngx_log.c 2015-02-23 14:16:30.058140183 -0300
+++ nginx-1.7.10/src/core/ngx_log.c 2015-02-23 14:17:09.821292306 -0300
@@ -69,7 +69,7 @@ static ngx_str_t err_levels[] = {
static const char *debug_levels[] = {
"debug_core", "debug_alloc", "debug_mutex", "debug_event",
- "debug_http", "debug_mail", "debug_mysql"
+ "debug_http", "debug_mail", "debug_mysql", "debug_tcp"
};
diff -rupN nginx-1.7.10-original/src/core/ngx_log.h nginx-1.7.10/src/core/ngx_log.h
--- nginx-1.7.10-original/src/core/ngx_log.h 2015-02-23 14:16:30.056140125 -0300
+++ nginx-1.7.10/src/core/ngx_log.h 2015-02-23 14:17:43.398265187 -0300
@@ -30,6 +30,7 @@
#define NGX_LOG_DEBUG_HTTP 0x100
#define NGX_LOG_DEBUG_MAIL 0x200
#define NGX_LOG_DEBUG_MYSQL 0x400
+#define NGX_LOG_DEBUG_TCP 0x800
/*
* do not forget to update debug_levels[] in src/core/ngx_log.c
@@ -37,7 +38,7 @@
*/
#define NGX_LOG_DEBUG_FIRST NGX_LOG_DEBUG_CORE
-#define NGX_LOG_DEBUG_LAST NGX_LOG_DEBUG_MYSQL
+#define NGX_LOG_DEBUG_LAST NGX_LOG_DEBUG_TCP
#define NGX_LOG_DEBUG_CONNECTION 0x80000000
#define NGX_LOG_DEBUG_ALL 0x7ffffff0
diff -rupN nginx-1.7.10-original/src/event/ngx_event_connect.h nginx-1.7.10/src/event/ngx_event_connect.h
--- nginx-1.7.10-original/src/event/ngx_event_connect.h 2015-02-23 14:16:30.055140096 -0300
+++ nginx-1.7.10/src/event/ngx_event_connect.h 2015-02-23 14:18:49.025166704 -0300
@@ -18,6 +18,7 @@
#define NGX_PEER_NEXT 2
#define NGX_PEER_FAILED 4
+#define NGX_INVALID_CHECK_INDEX (ngx_uint_t)(-1)
typedef struct ngx_peer_connection_s ngx_peer_connection_t;
@@ -42,6 +43,9 @@ struct ngx_peer_connection_s {
ngx_str_t *name;
ngx_uint_t tries;
+
+ ngx_uint_t check_index;
+
ngx_msec_t start_time;
ngx_event_get_peer_pt get;