Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tcp-proxy-nginx-module: Updated to 0.4.5 #80

Merged
merged 1 commit into from
Feb 6, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Formula/nginx-full.rb
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ def patches
if build.with? "ustats-module"
patches[:p1] = "https://raw.githubusercontent.com/nginx-modules/ngx_ustats_module/master/nginx-1.6.1.patch"
end
if build.with? "tcp-proxy-module"
patches[:p1] = "https://raw.githubusercontent.com/yaoweibin/nginx_tcp_proxy_module/master/tcp.patch"
end
patches
end

Expand Down
60 changes: 3 additions & 57 deletions Formula/tcp-proxy-nginx-module.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,64 +2,10 @@

class TcpProxyNginxModule < Formula
homepage "https://github.com/yaoweibin/nginx_tcp_proxy_module"
url "https://github.com/yaoweibin/nginx_tcp_proxy_module/archive/v0.26.tar.gz"
sha1 "3997b93b6421d0afa69e7fd79a952c16a1f5db1b"

# Fix issue compatibility
patch :DATA

url "https://github.com/yaoweibin/nginx_tcp_proxy_module/archive/v0.4.5.tar.gz"
sha1 "7060c16dba7f31a22462d1a1e3ac97d81c59aef2"

def install
(share+"tcp-proxy-nginx-module").install Dir["*"]
end
end

__END__
--- a/src/core/ngx_log.c
+++ b/src/core/ngx_log.c
@@ -66,7 +66,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"
};


--- a/src/core/ngx_log.h
+++ b/src/core/ngx_log.h
@@ -29,6 +29,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
@@ -36,7 +37,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

--- a/src/event/ngx_event_connect.h
+++ b/src/event/ngx_event_connect.h
@@ -32,6 +32,7 @@ typedef void (*ngx_event_save_peer_session_pt)(ngx_peer_connection_t *pc,
void *data);
#endif

+#define NGX_INVALID_CHECK_INDEX (ngx_uint_t)(-1)

struct ngx_peer_connection_s {
ngx_connection_t *connection;
@@ -42,6 +43,8 @@ struct ngx_peer_connection_s {

ngx_uint_t tries;

+ ngx_uint_t check_index;
+
ngx_event_get_peer_pt get;
ngx_event_free_peer_pt free;
void *data;