]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Merge remote-tracking branch 'asn-mytor/bug4751'
authorNick Mathewson <nickm@torproject.org>
Mon, 16 Jan 2012 20:16:41 +0000 (15:16 -0500)
committerNick Mathewson <nickm@torproject.org>
Mon, 16 Jan 2012 20:16:41 +0000 (15:16 -0500)
1  2 
src/or/config.c
src/or/transports.c

diff --cc src/or/config.c
Simple merge
index d8d2ff6aa644b82020c22867a7500e92efcc6dcb,06c91452c61a7d733d967a4c1fa2b605544c36d0..43e978a7c10e26527158e81200b61d37549a64db
@@@ -912,22 -912,24 +912,23 @@@ parse_cmethod_line(const char *line, ma
    return r;
  }
  
- /** Return a string containing the address:port that <b>transport</b>
-  *  should use. It's the responsibility of the caller to free() the
-  *  received string. */
+ /** Return the string that tor should place in TOR_PT_SERVER_BINDADDR
+  *  while configuring the server managed proxy in <b>mp</b>. The
+  *  string is stored in the heap, and it's the the responsibility of
+  *  the caller to deallocate it after its use. */
  static char *
- get_bindaddr_for_proxy(const managed_proxy_t *mp)
+ get_bindaddr_for_server_proxy(const managed_proxy_t *mp)
  {
 -  char *bindaddr = NULL;
 +  char *bindaddr_result = NULL;
    char *bindaddr_tmp = NULL;
    smartlist_t *string_tmp = smartlist_create();
  
    tor_assert(mp->is_server);
  
    SMARTLIST_FOREACH_BEGIN(mp->transports_to_launch, char *, t) {
-     bindaddr_tmp = get_bindaddr_for_transport(t);
+     bindaddr_tmp = get_stored_bindaddr_for_server_transport(t);
  
 -    tor_asprintf(&bindaddr, "%s-%s", t, bindaddr_tmp);
 -    smartlist_add(string_tmp, bindaddr);
 +    smartlist_add_asprintf(string_tmp, "%s-%s", t, bindaddr_tmp);
  
      tor_free(bindaddr_tmp);
    } SMARTLIST_FOREACH_END(t);