mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-23 22:47:12 +01:00
Document some transports.c behaviors and assumptions
This commit is contained in:
parent
e603692adc
commit
9ceec869b5
1 changed files with 16 additions and 3 deletions
|
@ -1034,8 +1034,11 @@ create_managed_proxy_environment(const managed_proxy_t *mp)
|
|||
}
|
||||
|
||||
/** Create and return a new managed proxy for <b>transport</b> using
|
||||
* <b>proxy_argv</b>. If <b>is_server</b> is true, it's a server
|
||||
* managed proxy. */
|
||||
* <b>proxy_argv</b>. Also, add it to the global managed proxy list. If
|
||||
* <b>is_server</b> is true, it's a server managed proxy. Takes ownership of
|
||||
* <b>proxy_argv</b>.
|
||||
*
|
||||
* Requires that proxy_argv have at least one element. */
|
||||
static managed_proxy_t *
|
||||
managed_proxy_create(const smartlist_t *transport_list,
|
||||
char **proxy_argv, int is_server)
|
||||
|
@ -1063,7 +1066,13 @@ managed_proxy_create(const smartlist_t *transport_list,
|
|||
|
||||
/** Register proxy with <b>proxy_argv</b>, supporting transports in
|
||||
* <b>transport_list</b>, to the managed proxy subsystem.
|
||||
* If <b>is_server</b> is true, then the proxy is a server proxy. */
|
||||
* If <b>is_server</b> is true, then the proxy is a server proxy.
|
||||
*
|
||||
* Takes ownership of proxy_argv.
|
||||
*
|
||||
* Requires that proxy_argv be a NULL-terminated array of command-line
|
||||
* elements, containing at least one element.
|
||||
**/
|
||||
void
|
||||
pt_kickstart_proxy(const smartlist_t *transport_list,
|
||||
char **proxy_argv, int is_server)
|
||||
|
@ -1071,6 +1080,10 @@ pt_kickstart_proxy(const smartlist_t *transport_list,
|
|||
managed_proxy_t *mp=NULL;
|
||||
transport_t *old_transport = NULL;
|
||||
|
||||
if (!proxy_argv || !proxy_argv[0]) {
|
||||
return;
|
||||
}
|
||||
|
||||
mp = get_managed_proxy_by_argv_and_type(proxy_argv, is_server);
|
||||
|
||||
if (!mp) { /* we haven't seen this proxy before */
|
||||
|
|
Loading…
Add table
Reference in a new issue