[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r16405: don't log-warn on a bootstrapping status event if the recomm (tor/trunk/src/or)
Author: arma
Date: 2008-08-04 19:38:32 -0400 (Mon, 04 Aug 2008)
New Revision: 16405
Modified:
tor/trunk/src/or/control.c
Log:
don't log-warn on a bootstrapping status event if the recommendation
is to ignore.
Modified: tor/trunk/src/or/control.c
===================================================================
--- tor/trunk/src/or/control.c 2008-08-04 23:35:12 UTC (rev 16404)
+++ tor/trunk/src/or/control.c 2008-08-04 23:38:32 UTC (rev 16405)
@@ -3850,7 +3850,7 @@
/* Called when Tor has failed to make bootstrapping progress in a way
* that indicates a problem. <b>warn</b> gives a hint as to why, and
- * <b>reason</b> provides an "or_conn_end_reason" tag).
+ * <b>reason</b> provides an "or_conn_end_reason" tag.
*/
void
control_event_bootstrap_problem(const char *warn, int reason)
@@ -3879,11 +3879,12 @@
while (status>=0 && bootstrap_status_to_string(status, &tag, &summary) < 0)
status--; /* find a recognized status string based on current progress */
- log_warn(LD_CONTROL, "Problem bootstrapping. Stuck at %d%%: %s. (%s; %s; "
- "count %d; recommendation %s)",
- status, summary, warn,
- orconn_end_reason_to_control_string(reason),
- bootstrap_problems, recommendation);
+ log_fn(!strcmp(recommendation, "warn") ? LOG_WARN : LOG_INFO,
+ LD_CONTROL, "Problem bootstrapping. Stuck at %d%%: %s. (%s; %s; "
+ "count %d; recommendation %s)",
+ status, summary, warn,
+ orconn_end_reason_to_control_string(reason),
+ bootstrap_problems, recommendation);
tor_snprintf(buf, sizeof(buf),
"BOOTSTRAP PROGRESS=%d TAG=%s SUMMARY=\"%s\" WARNING=\"%s\" REASON=%s "
"COUNT=%d RECOMMENDATION=%s",