ソースを参照

r11931@catbus: nickm | 2007-02-24 15:28:34 -0500
crank up the length of the maximum allowed control message.


svn:r9644

Nick Mathewson 18 年 前
コミット
af57074f08
2 ファイル変更5 行追加2 行削除
  1. 2 0
      ChangeLog
  2. 3 2
      src/or/control.c

+ 2 - 0
ChangeLog

@@ -23,6 +23,8 @@ Changes in version 0.1.2.8-alpha - 2007-??-??
       "INTERNAL".
       "INTERNAL".
     - Change reported stream target addresses to IP consistently when
     - Change reported stream target addresses to IP consistently when
       we finally get the IP from an exit node.
       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):
   o Minor bugfixes (other):
     - Display correct results when reporting which versions are
     - Display correct results when reporting which versions are

+ 3 - 2
src/or/control.c

@@ -729,9 +729,10 @@ static void
 send_control1_event_impl(uint16_t event, event_format_t which, int extended,
 send_control1_event_impl(uint16_t event, event_format_t which, int extended,
                          const char *format, va_list ap)
                          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;
   int r;
-  char buf[SEND_CONTROL1_EVENT_BUFFERSIZE]; /* XXXX Length */
+  char buf[SEND_CONTROL1_EVENT_BUFFERSIZE];
   size_t len;
   size_t len;
   char *cp;
   char *cp;