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

[or-cvs] r9644: crank up the length of the maximum allowed control message. (in tor/trunk: . src/or)



Author: nickm
Date: 2007-02-24 15:28:41 -0500 (Sat, 24 Feb 2007)
New Revision: 9644

Modified:
   tor/trunk/
   tor/trunk/ChangeLog
   tor/trunk/src/or/control.c
Log:
 r11931@catbus:  nickm | 2007-02-24 15:28:34 -0500
 crank up the length of the maximum allowed control message.



Property changes on: tor/trunk
___________________________________________________________________
 svk:merge ticket from /tor/trunk [r11931] on 8246c3cf-6607-4228-993b-4d95d33730f1

Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog	2007-02-24 20:02:47 UTC (rev 9643)
+++ tor/trunk/ChangeLog	2007-02-24 20:28:41 UTC (rev 9644)
@@ -23,6 +23,8 @@
       "INTERNAL".
     - Change reported stream target addresses to IP consistently when
       we finally get the IP from an exit node.
+    - Send log messages to the controller even if they happen to be very
+      long.
 
   o Minor bugfixes (other):
     - Display correct results when reporting which versions are

Modified: tor/trunk/src/or/control.c
===================================================================
--- tor/trunk/src/or/control.c	2007-02-24 20:02:47 UTC (rev 9643)
+++ tor/trunk/src/or/control.c	2007-02-24 20:28:41 UTC (rev 9644)
@@ -729,9 +729,10 @@
 send_control1_event_impl(uint16_t event, event_format_t which, int extended,
                          const char *format, va_list ap)
 {
-#define SEND_CONTROL1_EVENT_BUFFERSIZE 1024
+  /* This is just a little longer than the longest allowed log message */
+#define SEND_CONTROL1_EVENT_BUFFERSIZE 10064
   int r;
-  char buf[SEND_CONTROL1_EVENT_BUFFERSIZE]; /* XXXX Length */
+  char buf[SEND_CONTROL1_EVENT_BUFFERSIZE];
   size_t len;
   char *cp;