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

[or-cvs] log how big the failed rend descriptor is, and if it"s smal...



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

Modified Files:
	directory.c 
Log Message:
log how big the failed rend descriptor is, and if it's small, log
a base16 of the whole thing.


Index: directory.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/directory.c,v
retrieving revision 1.332
retrieving revision 1.333
diff -u -p -d -r1.332 -r1.333
--- directory.c	29 Dec 2005 04:43:24 -0000	1.332
+++ directory.c	29 Dec 2005 04:57:19 -0000	1.333
@@ -1556,7 +1556,13 @@ directory_handle_command_post(connection
   if (!strcmpstart(url,"/tor/rendezvous/publish")) {
     /* rendezvous descriptor post */
     if (rend_cache_store(body, body_len) < 0) {
-      notice(LD_DIRSERV,"Rejected rend descriptor from %s.", origin);
+      char tmp[1024*2+1];
+      notice(LD_DIRSERV,"Rejected rend descriptor (length %d) from %s.",
+             (int)body_len, origin);
+      if (body_len <= 1024) {
+        base16_encode(tmp, sizeof(tmp), body, body_len);
+        notice(LD_DIRSERV,"Body was: %s", tmp);
+      }
       write_http_status_line(conn, 400, "Invalid service descriptor rejected");
     } else {
       write_http_status_line(conn, 200, "Service descriptor stored");