Permalink
Browse files

Merge pull request #86 from chobits/new_macro

added marco ngx_tcp_cycle_get_module_main_conf
  • Loading branch information...
2 parents dcdfe9e + fdaaa08 commit 776a6a50c67bf6a656ec3e14187e7357fc4e23d0 @yaoweibin committed Feb 15, 2014
Showing with 6 additions and 0 deletions.
  1. +6 −0 ngx_tcp.h
View
@@ -271,8 +271,14 @@ typedef struct {
#define ngx_tcp_conf_get_module_srv_conf(cf, module) \
((ngx_tcp_conf_ctx_t *) cf->ctx)->srv_conf[module.ctx_index]
+#define ngx_tcp_cycle_get_module_main_conf(cycle, module) \
+ (cycle->conf_ctx[ngx_tcp_module.index] ? \
+ ((ngx_tcp_conf_ctx_t *) cycle->conf_ctx[ngx_tcp_module.index]) \
+ ->main_conf[module.ctx_index]: \
+ NULL)
extern ngx_uint_t ngx_tcp_max_module;
extern ngx_module_t ngx_tcp_core_module;
+extern ngx_module_t ngx_tcp_module;
#endif /* _NGX_TCP_H_INCLUDED_ */

0 comments on commit 776a6a5

Please sign in to comment.