Skip to content

Commit

Permalink
RB-9093: build nginx without graphite module patch
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikhail Kirichenko committed Oct 26, 2015
1 parent e5bd3de commit b85d0d4
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 14 deletions.
26 changes: 13 additions & 13 deletions graphite_module_v1_7_7.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
Only in b: Makefile
Only in b: objs
diff -u -p -r a/src/event/ngx_event_openssl.c b/src/event/ngx_event_openssl.c
--- a/src/event/ngx_event_openssl.c 2015-06-24 12:24:37.105614096 +0300
+++ b/src/event/ngx_event_openssl.c 2015-06-24 12:24:40.714496163 +0300
--- a/src/event/ngx_event_openssl.c 2014-10-28 18:04:48.000000000 +0300
+++ b/src/event/ngx_event_openssl.c 2015-10-26 14:02:58.485592941 +0300
@@ -1028,6 +1028,16 @@ ngx_ssl_handshake(ngx_connection_t *c)

ngx_ssl_clear_error(c->log);
Expand Down Expand Up @@ -34,8 +32,8 @@ diff -u -p -r a/src/event/ngx_event_openssl.c b/src/event/ngx_event_openssl.c
c->send = ngx_ssl_write;
c->recv_chain = ngx_ssl_recv_chain;
diff -u -p -r a/src/event/ngx_event_openssl.h b/src/event/ngx_event_openssl.h
--- a/src/event/ngx_event_openssl.h 2015-06-24 12:24:37.104614090 +0300
+++ b/src/event/ngx_event_openssl.h 2015-06-24 12:24:40.692496892 +0300
--- a/src/event/ngx_event_openssl.h 2014-10-28 18:04:48.000000000 +0300
+++ b/src/event/ngx_event_openssl.h 2015-10-26 14:02:58.486592902 +0300
@@ -56,6 +56,14 @@ typedef struct {
ngx_event_handler_pt saved_read_handler;
ngx_event_handler_pt saved_write_handler;
Expand All @@ -52,8 +50,8 @@ diff -u -p -r a/src/event/ngx_event_openssl.h b/src/event/ngx_event_openssl.h
unsigned renegotiation:1;
unsigned buffer:1;
diff -u -p -r a/src/http/modules/ngx_http_gzip_filter_module.c b/src/http/modules/ngx_http_gzip_filter_module.c
--- a/src/http/modules/ngx_http_gzip_filter_module.c 2015-06-24 12:24:37.109614125 +0300
+++ b/src/http/modules/ngx_http_gzip_filter_module.c 2015-06-24 12:24:40.835492177 +0300
--- a/src/http/modules/ngx_http_gzip_filter_module.c 2014-10-28 18:04:48.000000000 +0300
+++ b/src/http/modules/ngx_http_gzip_filter_module.c 2015-10-26 14:02:58.486592902 +0300
@@ -365,6 +365,16 @@ ngx_http_gzip_body_filter(ngx_http_reque
}
}
Expand Down Expand Up @@ -110,8 +108,8 @@ diff -u -p -r a/src/http/modules/ngx_http_gzip_filter_module.c b/src/http/module
}

diff -u -p -r a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c
--- a/src/http/ngx_http_core_module.c 2015-06-24 12:24:37.110614157 +0300
+++ b/src/http/ngx_http_core_module.c 2015-06-24 12:24:40.847491782 +0300
--- a/src/http/ngx_http_core_module.c 2014-10-28 18:04:48.000000000 +0300
+++ b/src/http/ngx_http_core_module.c 2015-10-26 14:02:58.488592822 +0300
@@ -1404,7 +1404,19 @@ ngx_http_core_content_phase(ngx_http_req

if (r->content_handler) {
Expand All @@ -134,13 +132,15 @@ diff -u -p -r a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.
}

diff -u -p -r a/src/http/ngx_http_request.h b/src/http/ngx_http_request.h
--- a/src/http/ngx_http_request.h 2015-06-24 12:24:37.112614211 +0300
+++ b/src/http/ngx_http_request.h 2015-06-24 12:24:40.895490195 +0300
@@ -569,6 +569,21 @@ struct ngx_http_request_s {
--- a/src/http/ngx_http_request.h 2014-10-28 18:04:48.000000000 +0300
+++ b/src/http/ngx_http_request.h 2015-10-26 14:03:34.458406927 +0300
@@ -569,6 +569,23 @@ struct ngx_http_request_s {

unsigned http_minor:16;
unsigned http_major:16;
+
+#define NGX_GRAPHITE_PATCH
+
+#if (NGX_GRAPHITE)
+ time_t content_start_sec;
+ ngx_msec_t content_start_msec;
Expand Down
7 changes: 6 additions & 1 deletion src/ngx_http_graphite_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -1468,7 +1468,12 @@ ngx_http_graphite_param_content_time(ngx_http_request_t *r) {

ngx_msec_int_t ms;

ms = 0;

#if (defined(NGX_GRAPHITE_PATCH))
ms = (ngx_msec_int_t)((r->content_end_sec - r->content_start_sec) * 1000 + (r->content_end_msec - r->content_start_msec));
#endif

ms = ngx_max(ms, 0);

return (double)ms;
Expand All @@ -1481,7 +1486,7 @@ ngx_http_graphite_param_gzip_time(ngx_http_request_t *r) {

ms = 0;

#if (NGX_HTTP_GZIP)
#if (defined(NGX_GRAPHITE_PATCH) && (NGX_HTTP_GZIP))
ms = (ngx_msec_int_t)((r->gzip_end_sec - r->gzip_start_sec) * 1000 + (r->gzip_end_msec - r->gzip_start_msec));
#endif
ms = ngx_max(ms, 0);
Expand Down

0 comments on commit b85d0d4

Please sign in to comment.