diff options
author | George Kadianakis <desnacked@riseup.net> | 2012-10-23 02:51:31 +0300 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2012-11-06 17:53:09 -0500 |
commit | a9f786758dc59ee28fbbd16228e38ff9ba1bc7a9 (patch) | |
tree | 73ecdda4e8680be73f8feb35eeed171ca1d89b9f /src/common/util.c | |
parent | 39a0a2c3ae8c93ceed42f6d2d1143002c231fc16 (diff) | |
download | tor-a9f786758dc59ee28fbbd16228e38ff9ba1bc7a9.tar tor-a9f786758dc59ee28fbbd16228e38ff9ba1bc7a9.tar.gz |
Add warning message when a managed proxy dies during configuration.
Diffstat (limited to 'src/common/util.c')
-rw-r--r-- | src/common/util.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/common/util.c b/src/common/util.c index 75eb233be..1b0603a46 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -4461,6 +4461,25 @@ tor_split_lines(smartlist_t *sl, char *buf, int len) return smartlist_len(sl); } +/** Return a string corresponding to <b>stream_status</b>. */ +const char * +stream_status_to_string(enum stream_status stream_status) +{ + switch (stream_status) { + case IO_STREAM_OKAY: + return "okay"; + case IO_STREAM_EAGAIN: + return "temporarily unavailable"; + case IO_STREAM_TERM: + return "terminated"; + case IO_STREAM_CLOSED: + return "closed"; + default: + tor_fragile_assert(); + return "unknown"; + } +} + #ifdef _WIN32 /** Return a smartlist containing lines outputted from |