summaryrefslogtreecommitdiff
path: root/src/common/confline.h
diff options
context:
space:
mode:
authorDaniel Pinto <danielpinto52@gmail.com>2017-05-18 23:44:16 +0100
committerDaniel Pinto <danielpinto52@gmail.com>2017-05-18 23:44:16 +0100
commitba3a5f82f11388237a3ba4995ddf0b6ffaaf492a (patch)
treec0cf4342524cd040e24fe9cc420bb70e21c0a9d5 /src/common/confline.h
parentec6b2bbf9bb561e34f9fbe6663d1eb691604348d (diff)
downloadtor-ba3a5f82f11388237a3ba4995ddf0b6ffaaf492a.tar.gz
tor-ba3a5f82f11388237a3ba4995ddf0b6ffaaf492a.zip
Add support for %include funcionality on torrc #1922
config_get_lines is now split into two functions: - config_get_lines which is the same as before we had %include - config_get_lines_include which actually processes %include
Diffstat (limited to 'src/common/confline.h')
-rw-r--r--src/common/confline.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/common/confline.h b/src/common/confline.h
index 477c6929a2..eb863e8fd8 100644
--- a/src/common/confline.h
+++ b/src/common/confline.h
@@ -15,6 +15,8 @@
/* Removes all previous configuration for an option. */
#define CONFIG_LINE_CLEAR 2
+#define MAX_INCLUDE_RECURSION_LEVEL 31
+
/** A linked list of lines in a config file, or elsewhere */
typedef struct config_line_t {
char *key;
@@ -41,6 +43,8 @@ const config_line_t *config_line_find(const config_line_t *lines,
int config_lines_eq(config_line_t *a, config_line_t *b);
int config_count_key(const config_line_t *a, const char *key);
int config_get_lines(const char *string, config_line_t **result, int extended);
+int config_get_lines_include(const char *string, config_line_t **result,
+ int extended, int *has_include);
void config_free_lines(config_line_t *front);
const char *parse_config_line_from_str_verbose(const char *line,
char **key_out, char **value_out,