Skip to content

Commit e75ef65

Browse files
committed
Add branch for freenginx
1 parent 008a6c5 commit e75ef65

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/ngx_http_vhost_traffic_status_display_json.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
#include "ngx_http_upstream_check_module.h"
1515
#endif
1616

17+
#if nginx_version > 1027003
18+
#ifdef NGX_HTTP_UPSTREAM_MODIFY // for freenginx
1719
static u_char *
1820
ngx_http_vhost_traffic_status_display_ug_host(
1921
ngx_http_request_t *r,
@@ -22,6 +24,8 @@ ngx_http_vhost_traffic_status_display_ug_host(
2224
ngx_rbtree_node_t *sentinel,
2325
ngx_http_upstream_rr_peers_t *peers,
2426
u_char *buf);
27+
#endif
28+
#endif
2529

2630
u_char *
2731
ngx_http_vhost_traffic_status_display_set_main(ngx_http_request_t *r,
@@ -616,6 +620,7 @@ ngx_http_vhost_traffic_status_display_set_upstream_group(ngx_http_request_t *r,
616620
zone = 1;
617621

618622
#if nginx_version > 1027003
623+
#ifdef NGX_HTTP_UPSTREAM_MODIFY // for freenginx
619624
if (uscf->flags & NGX_HTTP_UPSTREAM_MODIFY) {
620625
peers = uscf->peer.data;
621626
buf = ngx_http_vhost_traffic_status_display_ug_host(r, uscf->host, ctx->rbtree->root, ctx->rbtree->sentinel, peers, buf);
@@ -667,6 +672,7 @@ ngx_http_vhost_traffic_status_display_set_upstream_group(ngx_http_request_t *r,
667672
}
668673
}
669674
goto last;
675+
#endif
670676
#endif
671677

672678
peers = uscf->peer.data;
@@ -780,7 +786,11 @@ ngx_http_vhost_traffic_status_display_set_upstream_group(ngx_http_request_t *r,
780786
}
781787
}
782788

789+
#if nginx_version > 1027003
790+
#ifdef NGX_HTTP_UPSTREAM_MODIFY // for freenginx
783791
last:
792+
#endif
793+
#endif
784794
if (s == buf) {
785795
buf = o;
786796

@@ -1002,6 +1012,8 @@ ngx_http_vhost_traffic_status_display_set(ngx_http_request_t *r,
10021012
return buf;
10031013
}
10041014

1015+
#if nginx_version > 1027003
1016+
#ifdef NGX_HTTP_UPSTREAM_MODIFY // for freenginx
10051017
static u_char *
10061018
ngx_http_vhost_traffic_status_display_ug_host(
10071019
ngx_http_request_t *r,
@@ -1062,4 +1074,6 @@ ngx_http_vhost_traffic_status_display_ug_host(
10621074
}
10631075
return buf;
10641076
}
1077+
#endif
1078+
#endif
10651079
/* vi:set ft=c ts=4 sw=4 et fdm=marker: */

0 commit comments

Comments
 (0)