[tor-commits] [tor/master] Fix compilation on 1667 code.

nickm at torproject.org nickm at torproject.org
Wed Jul 5 15:01:47 UTC 2017


commit acf65544bb0cb0473d1f846985ae2807123fbbbd
Author: Nick Mathewson <nickm at torproject.org>
Date:   Wed Jun 21 10:35:35 2017 -0400

    Fix compilation on 1667 code.
---
 src/or/buffers.c | 2 +-
 src/or/control.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/or/buffers.c b/src/or/buffers.c
index af1b67e..060f58c 100644
--- a/src/or/buffers.c
+++ b/src/or/buffers.c
@@ -2040,7 +2040,7 @@ peek_buf_has_http_command(buf_t *buf)
 int
 peek_buf_startswith(buf_t *buf, const char *cmd)
 {
-  int clen = strlen(cmd);
+  size_t clen = strlen(cmd);
   if (buf->datalen >= clen)
     if (!strncasecmp((buf->head)->data, cmd, (size_t) clen))
       return 1;
diff --git a/src/or/control.c b/src/or/control.c
index 3e31f17..ee9a3ae 100644
--- a/src/or/control.c
+++ b/src/or/control.c
@@ -4928,7 +4928,7 @@ connection_control_process_inbuf(control_connection_t *conn)
   }
 
   /* If the user has the HTTP proxy port and the control port confused. */
-  if (conn->_base.state == CONTROL_CONN_STATE_NEEDAUTH &&
+  if (conn->base_.state == CONTROL_CONN_STATE_NEEDAUTH &&
       peek_connection_has_http_command(TO_CONN(conn))) {
     connection_write_str_to_buf("HTTP/1.0 501 Tor ControlPort is not a proxy"
 "\r\nContent-Type: text/html; charset=iso-8859-1\r\n\r\n"





More information about the tor-commits mailing list