aboutsummaryrefslogtreecommitdiff
path: root/debian/patches
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2008-03-11 14:38:24 +0000
committerPeter Palfrader <peter@palfrader.org>2008-03-11 14:38:24 +0000
commit2cb7f63c9cc98b8344a782aaa9cf130d031fbb93 (patch)
tree6be8147205be05780d377a1bdea02d4c1b03fbfe /debian/patches
parent09a9edad4182cbb5f0adb30330d201a0cab0cce1 (diff)
downloadtor-2cb7f63c9cc98b8344a782aaa9cf130d031fbb93.tar
tor-2cb7f63c9cc98b8344a782aaa9cf130d031fbb93.tar.gz
Forward port patch 06_add_compile_time_defaults.
svn:r13972
Diffstat (limited to 'debian/patches')
-rwxr-xr-xdebian/patches/06_add_compile_time_defaults.dpatch35
1 files changed, 8 insertions, 27 deletions
diff --git a/debian/patches/06_add_compile_time_defaults.dpatch b/debian/patches/06_add_compile_time_defaults.dpatch
index 20b645c42..578c96055 100755
--- a/debian/patches/06_add_compile_time_defaults.dpatch
+++ b/debian/patches/06_add_compile_time_defaults.dpatch
@@ -23,9 +23,9 @@ esac
exit 0
@DPATCH@
-diff -urNad trunk~/src/or/config.c trunk/src/or/config.c
---- trunk~/src/or/config.c 2008-02-23 11:08:40.000000000 +0100
-+++ trunk/src/or/config.c 2008-02-23 13:43:05.000000000 +0100
+diff -urNad git-trunk-conf~/src/or/config.c git-trunk-conf/src/or/config.c
+--- git-trunk-conf~/src/or/config.c 2008-03-11 15:23:01.000000000 +0100
++++ git-trunk-conf/src/or/config.c 2008-03-11 15:30:34.139280421 +0100
@@ -15,6 +15,7 @@
#define CONFIG_PRIVATE
@@ -34,7 +34,7 @@ diff -urNad trunk~/src/or/config.c trunk/src/or/config.c
#ifdef MS_WINDOWS
#include <shlobj.h>
#endif
-@@ -660,6 +661,8 @@
+@@ -658,6 +659,8 @@
#if defined(HAVE_EVENT_GET_VERSION) && defined(HAVE_EVENT_GET_METHOD)
static void check_libevent_version(const char *m, int server);
#endif
@@ -43,18 +43,9 @@ diff -urNad trunk~/src/or/config.c trunk/src/or/config.c
/** Magic value for or_options_t. */
#define OR_OPTIONS_MAGIC 9090909
-@@ -3522,7 +3525,7 @@
- int
- options_init_from_torrc(int argc, char **argv)
- {
-- or_options_t *oldoptions, *newoptions;
-+ or_options_t *oldoptions, *newoptions = NULL;
- config_line_t *cl;
- char *cf=NULL, *fname=NULL, *errmsg=NULL;
- int i, retval;
-@@ -3531,6 +3534,9 @@
- static char **backup_argv;
- static int backup_argc;
+@@ -3634,6 +3637,9 @@
+ char *command_arg = NULL;
+ char *errmsg=NULL;
+ if (debian_config_fix_defaults() < 0)
+ goto err;
@@ -62,17 +53,7 @@ diff -urNad trunk~/src/or/config.c trunk/src/or/config.c
if (argv) { /* first time we're called. save commandline args */
backup_argv = argv;
backup_argc = argc;
-@@ -3666,7 +3672,8 @@
- err:
- tor_free(fname);
- torrc_fname = NULL;
-- config_free(&options_format, newoptions);
-+ if (newoptions)
-+ config_free(&options_format, newoptions);
- if (errmsg) {
- log(LOG_WARN,LD_CONFIG,"Failed to parse/validate config: %s", errmsg);
- tor_free(errmsg);
-@@ -5011,3 +5018,64 @@
+@@ -5051,3 +5057,64 @@
puts(routerparse_c_id);
}