From fc3c0197f999c72e71572618bdd2671c2b77042c Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Fri, 30 Sep 2005 20:04:55 +0000 Subject: Resolve several DOCDOCs. Make non-mirrors only launch routerdesc downloads when they have more than 16 router descriptors to download, or when 10 minutes have passed since the last download. svn:r5166 --- src/or/or.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/or/or.h') diff --git a/src/or/or.h b/src/or/or.h index d09ed701e..c19169630 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -1669,6 +1669,12 @@ void control_adjust_event_log_severity(void); void disable_control_logging(void); void enable_control_logging(void); +/** Execute the statement stmt, which may log events concerning the + * connection conn. To prevent infinite loops, disable log messages + * being stent to controllers if conn is a control connection. + * + * Stmt must not contain any return or goto statements. + */ #define CONN_LOG_PROTECT(conn, stmt) \ do { \ int _log_conn_is_control = (conn && conn->type == CONN_TYPE_CONTROL); \ @@ -1679,6 +1685,11 @@ void enable_control_logging(void); enable_control_logging(); \ } while (0) +/** Log information about the connection conn, protecting it as with + * CONN_LOG_PROTECT. Example: + * + * LOG_FN_CONN(conn, (LOG_DEBUG, "Socket %d wants to write", conn->s)); + **/ #define LOG_FN_CONN(conn, args) \ CONN_LOG_PROTECT(conn, log_fn args) -- cgit v1.2.3