diff options
author | Karsten Loesing <karsten.loesing@gmx.net> | 2013-05-24 11:25:30 +0200 |
---|---|---|
committer | Karsten Loesing <karsten.loesing@gmx.net> | 2013-05-25 19:51:33 +0200 |
commit | a84fae789206db4e27486e693488328da7b3474a (patch) | |
tree | 994a50f24289a0592901e0fa1f5313934b91f1fe | |
parent | 2925e2fe786dfd9a27c2dff503996712cd180de4 (diff) | |
download | tor-a84fae789206db4e27486e693488328da7b3474a.tar.gz tor-a84fae789206db4e27486e693488328da7b3474a.zip |
Tweak ORCONN event based on comments by nickm.
- Move new ID= parameter in ORCONN event to end. Avoids possible trouble
from controllers that parse parameters by position, even though they
shouldn't.
-rw-r--r-- | src/or/control.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/or/control.c b/src/or/control.c index d3b968cde4..2accf7f4af 100644 --- a/src/or/control.c +++ b/src/or/control.c @@ -3858,18 +3858,17 @@ control_event_or_conn_status(or_connection_t *conn, or_conn_status_event_t tp, } ncircs += connection_or_get_num_circuits(conn); if (ncircs && (tp == OR_CONN_EVENT_FAILED || tp == OR_CONN_EVENT_CLOSED)) { - tor_snprintf(ncircs_buf, sizeof(ncircs_buf), "%sNCIRCS=%d", - reason ? " " : "", ncircs); + tor_snprintf(ncircs_buf, sizeof(ncircs_buf), " NCIRCS=%d", ncircs); } orconn_target_get_name(name, sizeof(name), conn); send_control_event(EVENT_OR_CONN_STATUS, ALL_FORMATS, - "650 ORCONN %s %s ID="U64_FORMAT" %s%s%s\r\n", + "650 ORCONN %s %s%s%s%s ID="U64_FORMAT"\r\n", name, status, - U64_PRINTF_ARG(conn->base_.global_identifier), - reason ? "REASON=" : "", + reason ? " REASON=" : "", orconn_end_reason_to_control_string(reason), - ncircs_buf); + ncircs_buf, + U64_PRINTF_ARG(conn->base_.global_identifier)); return 0; } |