# HG changeset patch
# User zyegfryed
# Date 1491925046 -7200
# Tue Apr 11 17:37:26 2017 +0200
# Node ID 2906f12bacd375ea626cefac5e028531c8c605f7
# Parent 29ba1d6a2da9320e68ef2b7a2516c4c424672ea8
Externalize ngx_udp_connect and ngx_tcp_connect functions
The aforementionned functions are used in many external modules [1] but
since changeset [6922:a72886067bbb], they are not publicly available,
hence breaking any module using them. This patch adress that issue.
[1]: https://github.com/search?q=ngx_udp_connect&type=Code
diff -r 29ba1d6a2da9 -r 2906f12bacd3 src/core/ngx_resolver.c
|
a
|
b
|
|
| 56 | 56 | ((u_char *) (n) - offsetof(ngx_resolver_node_t, node)) |
| 57 | 57 | |
| 58 | 58 | |
| 59 | | static ngx_int_t ngx_udp_connect(ngx_resolver_connection_t *rec); |
| 60 | | static ngx_int_t ngx_tcp_connect(ngx_resolver_connection_t *rec); |
| 61 | | |
| 62 | | |
| 63 | 59 | static void ngx_resolver_cleanup(void *data); |
| 64 | 60 | static void ngx_resolver_cleanup_tree(ngx_resolver_t *r, ngx_rbtree_t *tree); |
| 65 | 61 | static ngx_int_t ngx_resolve_name_locked(ngx_resolver_t *r, |
| … |
… |
|
| 4379 | 4375 | } |
| 4380 | 4376 | |
| 4381 | 4377 | |
| 4382 | | static ngx_int_t |
| | 4378 | ngx_int_t |
| 4383 | 4379 | ngx_udp_connect(ngx_resolver_connection_t *rec) |
| 4384 | 4380 | { |
| 4385 | 4381 | int rc; |
| … |
… |
|
| 4463 | 4459 | } |
| 4464 | 4460 | |
| 4465 | 4461 | |
| 4466 | | static ngx_int_t |
| | 4462 | ngx_int_t |
| 4467 | 4463 | ngx_tcp_connect(ngx_resolver_connection_t *rec) |
| 4468 | 4464 | { |
| 4469 | 4465 | int rc; |
diff -r 29ba1d6a2da9 -r 2906f12bacd3 src/core/ngx_resolver.h
|
a
|
b
|
|
| 235 | 235 | char *ngx_resolver_strerror(ngx_int_t err); |
| 236 | 236 | |
| 237 | 237 | |
| | 238 | ngx_int_t ngx_udp_connect(ngx_resolver_connection_t *rec); |
| | 239 | ngx_int_t ngx_tcp_connect(ngx_resolver_connection_t *rec); |
| | 240 | |
| | 241 | |
| 238 | 242 | #endif /* _NGX_RESOLVER_H_INCLUDED_ */ |