aboutsummaryrefslogtreecommitdiff
path: root/src/or/control.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/control.c')
-rw-r--r--src/or/control.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/or/control.c b/src/or/control.c
index e7d204473e..82017bd1d4 100644
--- a/src/or/control.c
+++ b/src/or/control.c
@@ -1490,7 +1490,7 @@ getinfo_helper_listeners(control_connection_t *control_conn,
struct sockaddr_storage ss;
socklen_t ss_len = sizeof(ss);
- if (conn->type != type || conn->marked_for_close || conn->s < 0)
+ if (conn->type != type || conn->marked_for_close || !SOCKET_OK(conn->s))
continue;
if (getsockname(conn->s, (struct sockaddr *)&ss, &ss_len) < 0) {
@@ -3120,7 +3120,6 @@ control_event_circuit_status(origin_circuit_t *circ, circuit_status_event_t tp,
{
const char *status;
char extended_buf[96];
- int providing_reason=0;
if (!EVENT_IS_INTERESTING(EVENT_CIRCUIT_STATUS))
return 0;
tor_assert(circ);
@@ -3144,7 +3143,6 @@ control_event_circuit_status(origin_circuit_t *circ, circuit_status_event_t tp,
const char *reason_str = circuit_end_reason_to_control_string(reason_code);
char *reason = NULL;
size_t n=strlen(extended_buf);
- providing_reason=1;
if (!reason_str) {
reason = tor_malloc(16);
tor_snprintf(reason, 16, "UNKNOWN_%d", reason_code);