diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/or/control.c | 3 | ||||
-rw-r--r-- | src/or/main.c | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/or/control.c b/src/or/control.c index 969dd4799..582f6e001 100644 --- a/src/or/control.c +++ b/src/or/control.c @@ -1543,6 +1543,8 @@ handle_control_postdescriptor(connection_t *conn, uint32_t len, { char *desc; int v0 = STATE_IS_V0(conn->state); + const char *msg=NULL; + if (v0) desc = (char*)body; else { @@ -1551,7 +1553,6 @@ handle_control_postdescriptor(connection_t *conn, uint32_t len, read_escaped_data(cp, len-(cp-body), 1, &desc); } - const char *msg=NULL; switch (router_load_single_router(desc, &msg)) { case -1: if (!msg) msg = "Could not parse descriptor"; diff --git a/src/or/main.c b/src/or/main.c index 4f11e8a5c..e3649501f 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -893,7 +893,7 @@ second_elapsed_callback(int fd, short event, void *args) /** Called when a possibly ignorable libevent error occurs; ensures that we * don't get into an infinite loop by ignoring too many errors from * libevent. */ -int +static int got_libevent_error(void) { if (++n_libevent_errors > 8) { |