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

[or-cvs] the tor clients in cvs can"t speak to the current tor authd...



Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/src/or

Modified Files:
	directory.c routerparse.c 
Log Message:
the tor clients in cvs can't speak to the current tor authdirservers for
rendezvous publishes and fetches, since they're still running 0.0.8. so
make them speak the old way until we've upgraded the authdirservers.


Index: directory.c
===================================================================
RCS file: /home/or/cvsroot/src/or/directory.c,v
retrieving revision 1.132
retrieving revision 1.133
diff -u -d -r1.132 -r1.133
--- directory.c	27 Sep 2004 06:45:32 -0000	1.132
+++ directory.c	28 Sep 2004 03:30:28 -0000	1.133
@@ -37,10 +37,13 @@
 
 extern or_options_t options; /* command-line and config-file options */
 
+#if 0 /* commented out for now, since for now what clients send is
+         different from what servers want to receive */
 /** URL for publishing rendezvous descriptors. */
 char rend_publish_string[] = "/tor/rendezvous/publish";
 /** Prefix for downloading rendezvous descriptors. */
 char rend_fetch_url[] = "/tor/rendezvous/";
+#endif
 
 #define MAX_HEADERS_SIZE 50000
 #define MAX_BODY_SIZE 500000
@@ -252,13 +255,13 @@
       memcpy(conn->rend_query, payload, payload_len);
       conn->rend_query[payload_len] = 0;
 
-      snprintf(tmp, sizeof(tmp), "GET %s%s HTTP/1.0\r\n\r\n", rend_fetch_url, payload);
+      snprintf(tmp, sizeof(tmp), "GET %s%s HTTP/1.0\r\n\r\n", "/rendezvous/", payload);
       connection_write_to_buf(tmp, strlen(tmp), conn);
       break;
     case DIR_PURPOSE_UPLOAD_RENDDESC:
       tor_assert(payload);
       snprintf(tmp, sizeof(tmp),
-        "POST %s HTTP/1.0\r\nContent-Length: %d\r\n\r\n", rend_publish_string, payload_len);
+        "POST %s HTTP/1.0\r\nContent-Length: %d\r\n\r\n", "/rendezvous/publish", payload_len);
       connection_write_to_buf(tmp, strlen(tmp), conn);
       /* could include nuls, need to write it separately */
       connection_write_to_buf(payload, payload_len, conn);
@@ -645,7 +648,7 @@
     return 0;
   }
 
-  if(!strcmpstart(url,rend_fetch_url)) {
+  if(!strcmpstart(url,"/tor/rendezvous/")) {
     /* rendezvous descriptor fetch */
     const char *descp;
     int desc_len;
@@ -660,7 +663,7 @@
       tor_free(url);
       return 0;
     }
-    switch(rend_cache_lookup_desc(url+strlen(rend_fetch_url), &descp, &desc_len)) {
+    switch(rend_cache_lookup_desc(url+strlen("/tor/rendezvous/"), &descp, &desc_len)) {
       case 1: /* valid */
         format_rfc1123_time(date, time(NULL));
         snprintf(tmp, sizeof(tmp), "HTTP/1.0 200 OK\r\nDate: %s\r\nContent-Length: %d\r\nContent-Type: application/octet-stream\r\n\r\n",
@@ -735,7 +738,7 @@
     return 0;
   }
 
-  if(!strcmpstart(url,rend_publish_string)) {
+  if(!strcmpstart(url,"/tor/rendezvous/publish")) {
     /* rendezvous descriptor post */
     if(rend_cache_store(body, body_len) < 0)
       connection_write_to_buf(answer400, strlen(answer400), conn);

Index: routerparse.c
===================================================================
RCS file: /home/or/cvsroot/src/or/routerparse.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- routerparse.c	27 Sep 2004 06:00:43 -0000	1.40
+++ routerparse.c	28 Sep 2004 03:30:28 -0000	1.41
@@ -1366,6 +1366,7 @@
   return tor_version_compare(&router_version, &cutoff_version) >= 0;
 }
 
+/** DOCDOC */
 int tor_version_parse(const char *s, tor_version_t *out)
 {
   char *eos=NULL, *cp=NULL;