From 9ce5801e22790e4df702b4a56555404c75ac8058 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Sun, 27 Nov 2011 18:11:50 -0500 Subject: Make linelists always overridden by the command line This starts an effort to refactor torrc handling code to make it easier to live with. It makes it possible to override exit policies from the command line, and possible to override (rather than append to) socksport lists from the command line. It'll be necessary to make a "base" torrc implementation work at all. --- src/or/or.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/or/or.h') diff --git a/src/or/or.h b/src/or/or.h index 546fe17bf3..b3fd082cb6 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -2836,11 +2836,23 @@ typedef struct port_cfg_t { char unix_addr[FLEXIBLE_ARRAY_MEMBER]; } port_cfg_t; +/** Ordinary configuration line. */ +#define CONFIG_LINE_NORMAL 0 +/** Appends to previous configuration for the same option, even if we + * would ordinary replace it. */ +#define CONFIG_LINE_APPEND 1 + /** A linked list of lines in a config file. */ typedef struct config_line_t { char *key; char *value; struct config_line_t *next; + /** What special treatment (if any) does this line require? */ + unsigned int command:1; + /** If true, subsequent assignments to this linelist should replace + * it, not extend it. Set only on the first item in a linelist in an + * or_options_t. */ + unsigned int fragile:1; } config_line_t; typedef struct routerset_t routerset_t; -- cgit v1.2.3-54-g00ecf