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

[or-cvs] r17724: {tor} the default should not be the notify the poster, unless some (tor/trunk/src/or)



Author: arma
Date: 2008-12-22 01:25:49 -0500 (Mon, 22 Dec 2008)
New Revision: 17724

Modified:
   tor/trunk/src/or/dirserv.c
   tor/trunk/src/or/or.h
Log:
the default should not be the notify the poster, unless something
more extreme happens. the default should be to be quiet unless
something more extreme happens.

at least, this doesn't generate complaints anymore. perhaps that
means it is working better? :)


Modified: tor/trunk/src/or/dirserv.c
===================================================================
--- tor/trunk/src/or/dirserv.c	2008-12-22 06:21:28 UTC (rev 17723)
+++ tor/trunk/src/or/dirserv.c	2008-12-22 06:25:49 UTC (rev 17724)
@@ -568,13 +568,7 @@
 static int
 WRA_MORE_SEVERE(was_router_added_t a, was_router_added_t b)
 {
-  if (b == ROUTER_ADDED_SUCCESSFULLY) {
-    return 1;
-  } else if (b == ROUTER_ADDED_NOTIFY_GENERATOR) {
-    return !WRA_WAS_ADDED(a);
-  } else {
-    return a < b;
-  }
+  return a < b;
 }
 
 /** As for dirserv_add_descriptor(), but accepts multiple documents, and
@@ -595,7 +589,7 @@
   int general = purpose == ROUTER_PURPOSE_GENERAL;
   tor_assert(msg);
 
-  r=ROUTER_ADDED_NOTIFY_GENERATOR; /*Least severe return value. */
+  r=ROUTER_ADDED_SUCCESSFULLY; /*Least severe return value. */
 
   format_iso_time(time_buf, now);
   if (tor_snprintf(annotation_buf, sizeof(annotation_buf),

Modified: tor/trunk/src/or/or.h
===================================================================
--- tor/trunk/src/or/or.h	2008-12-22 06:21:28 UTC (rev 17723)
+++ tor/trunk/src/or/or.h	2008-12-22 06:25:49 UTC (rev 17724)
@@ -4373,8 +4373,8 @@
 
 /** Return value for router_add_to_routerlist() and dirserv_add_descriptor() */
 typedef enum was_router_added_t {
-  ROUTER_ADDED_SUCCESSFULLY = 0,
-  ROUTER_ADDED_NOTIFY_GENERATOR = 1,
+  ROUTER_ADDED_SUCCESSFULLY = 1,
+  ROUTER_ADDED_NOTIFY_GENERATOR = 0,
   ROUTER_BAD_EI = -1,
   ROUTER_WAS_NOT_NEW = -2,
   ROUTER_NOT_IN_CONSENSUS = -3,