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

[or-cvs] r10137: use the new _PublishServerDescriptor to publish descriptors (tor/trunk/src/or)



Author: arma
Date: 2007-05-08 05:13:30 -0400 (Tue, 08 May 2007)
New Revision: 10137

Modified:
   tor/trunk/src/or/router.c
Log:
use the new _PublishServerDescriptor to publish descriptors either
to v2 authorities or to bridge authorities, depending on config.


Modified: tor/trunk/src/or/router.c
===================================================================
--- tor/trunk/src/or/router.c	2007-05-08 09:09:26 UTC (rev 10136)
+++ tor/trunk/src/or/router.c	2007-05-08 09:13:30 UTC (rev 10137)
@@ -764,6 +764,7 @@
   extrainfo_t *ei;
   char *msg;
   size_t desc_len, extra_len = 0, total_len;
+  authority_type_t auth = get_options()->_PublishServerDescriptor;
 
   ri = router_get_my_routerinfo();
   if (!ri) {
@@ -771,7 +772,7 @@
     return;
   }
   ei = router_get_my_extrainfo();
-  if (get_options()->_PublishServerDescriptor == NO_AUTHORITY)
+  if (auth == NO_AUTHORITY)
     return;
   if (!force && !desc_needs_upload)
     return;
@@ -787,7 +788,7 @@
   }
   msg[desc_len+extra_len] = 0;
 
-  directory_post_to_dirservers(DIR_PURPOSE_UPLOAD_DIR, V2_AUTHORITY,
+  directory_post_to_dirservers(DIR_PURPOSE_UPLOAD_DIR, auth,
                                msg, desc_len, extra_len);
   tor_free(msg);
 }