summaryrefslogtreecommitdiff
path: root/src/or/config.c
diff options
context:
space:
mode:
authorGeorge Kadianakis <desnacked@riseup.net>2013-06-12 17:12:39 +0300
committerNick Mathewson <nickm@torproject.org>2013-07-18 08:45:03 -0400
commit1ee3a0cf4440f34c024ff61a320e0b16553a3558 (patch)
tree9f116c2e14ecf8b5a1ee2c0fa20d87ba7d366fef /src/or/config.c
parent1a0cf08841904940ed46b2fcfd79cf65c65a1a6c (diff)
downloadtor-1ee3a0cf4440f34c024ff61a320e0b16553a3558.tar.gz
tor-1ee3a0cf4440f34c024ff61a320e0b16553a3558.zip
Place the options in the environment after processing them properly.
Diffstat (limited to 'src/or/config.c')
-rw-r--r--src/or/config.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/or/config.c b/src/or/config.c
index 1f6d1db1c5..4ddced8a68 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -4671,6 +4671,26 @@ get_transport_bindaddr_from_config(const char *transport)
return NULL;
}
+/** Given the name of a pluggable transport in <b>transport</b>, check
+ * the configuration file to see if the user has asked us to pass any
+ * parameters to the pluggable transport. Return a smartlist
+ * containing the parameters, otherwise NULL. */
+smartlist_t *
+get_options_for_server_transport(const char *transport)
+{
+ config_line_t *cl;
+ const or_options_t *options = get_options();
+
+ for (cl = options->ServerTransportOptions; cl; cl = cl->next) {
+ smartlist_t *options_sl =
+ get_options_from_transport_options_line(cl->value, transport);
+ if (options_sl)
+ return options_sl;
+ }
+
+ return NULL;
+}
+
/** Read the contents of a ServerTransportPlugin line from
* <b>line</b>. Return 0 if the line is well-formed, and -1 if it
* isn't.