[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] Correctly remove extraneous space in router family lines



commit 04007448b9f318f4c3517ce173272f756a02f28c
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Tue Aug 5 11:09:08 2014 -0400

    Correctly remove extraneous space in router family lines
    
    Fixes bug 12728; bugfix on 0.2.1.7-alpha when the SPLIT_IGNORE_SPACE
    option was added.
---
 changes/bug12728 |    4 ++++
 src/or/router.c  |    2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/changes/bug12728 b/changes/bug12728
new file mode 100644
index 0000000..ee39245
--- /dev/null
+++ b/changes/bug12728
@@ -0,0 +1,4 @@
+
+  o Minor bugfixes:
+    - When generating our family list, remove spaces from around the
+      entries there.  Fixes bug 12728; bugfix on 0.2.1.7-alpha.
diff --git a/src/or/router.c b/src/or/router.c
index eabd9c3..1b65f26 100644
--- a/src/or/router.c
+++ b/src/or/router.c
@@ -1884,7 +1884,7 @@ router_rebuild_descriptor(int force)
     family = smartlist_new();
     ri->declared_family = smartlist_new();
     smartlist_split_string(family, options->MyFamily, ",",
-      SPLIT_SKIP_SPACE|SPLIT_SKIP_SPACE|SPLIT_IGNORE_BLANK, 0);
+      SPLIT_SKIP_SPACE|SPLIT_IGNORE_BLANK|SPLIT_STRIP_SPACE, 0);
     SMARTLIST_FOREACH_BEGIN(family, char *, name) {
        const node_t *member;
        if (!strcasecmp(name, options->Nickname))



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits