diff options
author | Nick Mathewson <nickm@torproject.org> | 2015-03-12 11:37:02 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2015-03-12 11:37:02 -0400 |
commit | 1a1d431cff40dd92e43df892b0369cd12c3596fb (patch) | |
tree | ed3534b3b6b8dd33595ec022df7c4b87d7d35f93 | |
parent | 354897a13e46cc06cb86eb1451a6d356d0402f42 (diff) | |
parent | d4c17162632b662c333fb09b930838c3884a6fc7 (diff) | |
download | tor-1a1d431cff40dd92e43df892b0369cd12c3596fb.tar.gz tor-1a1d431cff40dd92e43df892b0369cd12c3596fb.zip |
Merge branch 'bug15245_026' into maint-0.2.6
-rw-r--r-- | changes/bug15245 | 5 | ||||
-rw-r--r-- | src/or/cpuworker.c | 8 |
2 files changed, 13 insertions, 0 deletions
diff --git a/changes/bug15245 b/changes/bug15245 new file mode 100644 index 0000000000..520a370eeb --- /dev/null +++ b/changes/bug15245 @@ -0,0 +1,5 @@ + o Major bugfixes: + - Avoid crashing when making certain configuration option changes + on clients. Fixes bug 15245; bugfix on 0.2.6.3-alpha. Reported + by "anonym". + diff --git a/src/or/cpuworker.c b/src/or/cpuworker.c index 09ffdb81d1..d511ecf84c 100644 --- a/src/or/cpuworker.c +++ b/src/or/cpuworker.c @@ -178,6 +178,12 @@ update_state_threadfn(void *state_, void *work_) void cpuworkers_rotate_keyinfo(void) { + if (!threadpool) { + /* If we're a client, then we won't have cpuworkers, and we won't need + * to tell them to rotate their state. + */ + return; + } if (threadpool_queue_update(threadpool, worker_state_new, update_state_threadfn, @@ -486,6 +492,8 @@ assign_onionskin_to_cpuworker(or_circuit_t *circ, cpuworker_request_t req; int should_time; + tor_assert(threadpool); + if (!circ->p_chan) { log_info(LD_OR,"circ->p_chan gone. Failing circ."); tor_free(onionskin); |