Ticket #1244: patch.diff

File patch.diff, 1.8 KB (added by zyegfryed@…, 10 years ago)
  • src/core/ngx_resolver.c

    # 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  
    5656        ((u_char *) (n) - offsetof(ngx_resolver_node_t, node))
    5757
    5858
    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 
    6359static void ngx_resolver_cleanup(void *data);
    6460static void ngx_resolver_cleanup_tree(ngx_resolver_t *r, ngx_rbtree_t *tree);
    6561static ngx_int_t ngx_resolve_name_locked(ngx_resolver_t *r,
    … …  
    43794375}
    43804376
    43814377
    4382 static ngx_int_t
     4378ngx_int_t
    43834379ngx_udp_connect(ngx_resolver_connection_t *rec)
    43844380{
    43854381    int                rc;
    … …  
    44634459}
    44644460
    44654461
    4466 static ngx_int_t
     4462ngx_int_t
    44674463ngx_tcp_connect(ngx_resolver_connection_t *rec)
    44684464{
    44694465    int                rc;
  • src/core/ngx_resolver.h

    diff -r 29ba1d6a2da9 -r 2906f12bacd3 src/core/ngx_resolver.h
    a b  
    235235char *ngx_resolver_strerror(ngx_int_t err);
    236236
    237237
     238ngx_int_t ngx_udp_connect(ngx_resolver_connection_t *rec);
     239ngx_int_t ngx_tcp_connect(ngx_resolver_connection_t *rec);
     240
     241
    238242#endif /* _NGX_RESOLVER_H_INCLUDED_ */