]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Only set a cookie when we intend to.
authorNick Mathewson <nickm@torproject.org>
Tue, 7 Dec 2004 19:36:43 +0000 (19:36 +0000)
committerNick Mathewson <nickm@torproject.org>
Tue, 7 Dec 2004 19:36:43 +0000 (19:36 +0000)
svn:r3114

src/or/control.c

index dfe0ea55efbe436aba5868edd3dbeefcff3efcc5..958e5dc804dc290b97db292124331a84641a6006 100644 (file)
@@ -589,8 +589,10 @@ init_cookie_authentication(int enabled)
 {
   char fname[512];
 
-  if (!enabled)
+  if (!enabled) {
     authentication_cookie_is_set = 0;
+    return 0;
+  }
 
   tor_snprintf(fname, sizeof(fname), "%s/control_auth_cookie",
                get_options()->DataDirectory);