[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/master] Merge remote-tracking branch 'asn-mytor/bug4751'
commit 47aa491f9fbae38f71f96f50c4aec3f871c8419d
Merge: 875a54d 39850f0
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date: Mon Jan 16 15:16:41 2012 -0500
Merge remote-tracking branch 'asn-mytor/bug4751'
src/or/config.c | 2 +-
src/or/config.h | 2 +-
src/or/transports.c | 19 ++++++++++---------
3 files changed, 12 insertions(+), 11 deletions(-)
diff --cc src/or/transports.c
index d8d2ff6,06c9145..43e978a
--- a/src/or/transports.c
+++ b/src/or/transports.c
@@@ -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);
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits