summaryrefslogtreecommitdiff
path: root/src/or/rephist.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2006-03-26 06:51:26 +0000
committerRoger Dingledine <arma@torproject.org>2006-03-26 06:51:26 +0000
commitb899b9592a89281a05d5b4b7842de67d106303ab (patch)
tree13d94062519b87a12d082a32b702f6cd6509664b /src/or/rephist.c
parent0543900fbf8b69b6b7c0e5640cd2bfb5f6653d96 (diff)
downloadtor-b899b9592a89281a05d5b4b7842de67d106303ab.tar.gz
tor-b899b9592a89281a05d5b4b7842de67d106303ab.zip
When the controller's *setconf commands fail, collect an error message
in a string and hand it back. This starts to resolve bug 275. svn:r6241
Diffstat (limited to 'src/or/rephist.c')
-rw-r--r--src/or/rephist.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/or/rephist.c b/src/or/rephist.c
index 31f0baaf07..5f8923bef7 100644
--- a/src/or/rephist.c
+++ b/src/or/rephist.c
@@ -694,7 +694,7 @@ rep_hist_update_state(or_state_t *state)
/** Set bandwidth history from our saved state.
*/
int
-rep_hist_load_state(or_state_t *state, const char **err)
+rep_hist_load_state(or_state_t *state, char **err)
{
time_t s_begins, start;
time_t now = time(NULL);
@@ -742,8 +742,7 @@ rep_hist_load_state(or_state_t *state, const char **err)
}
if (!all_ok) {
- if (err)
- *err = "Parsing of bandwidth history values failed";
+ *err = tor_strdup("Parsing of bandwidth history values failed");
/* and create fresh arrays */
tor_free(read_array);
tor_free(write_array);