diff options
author | Sebastian Hahn <sebastian@torproject.org> | 2017-04-29 09:15:14 +0200 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-05-19 08:47:10 -0400 |
commit | f8ef7c65d10ccd9403d9d64ceceba0dd74d6421f (patch) | |
tree | ba8345086b45682c3f0e586cf7f58db22fa9dbb0 /src/or/main.c | |
parent | 915fa39d0f927712f7a468c0a2f4497aef0a3b0f (diff) | |
download | tor-f8ef7c65d10ccd9403d9d64ceceba0dd74d6421f.tar.gz tor-f8ef7c65d10ccd9403d9d64ceceba0dd74d6421f.zip |
Add some Rust utility functions and print support
This gives an indication in the log that Tor was built with Rust
support, as well as laying some groundwork for further string-returning
APIs to be converted to Rust
Diffstat (limited to 'src/or/main.c')
-rw-r--r-- | src/or/main.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/or/main.c b/src/or/main.c index 0da43dc232..dcd7ef215e 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -58,6 +58,7 @@ #include "circuitlist.h" #include "circuituse.h" #include "command.h" +#include "compat_rust.h" #include "compress.h" #include "config.h" #include "confparse.h" @@ -3039,6 +3040,15 @@ tor_init(int argc, char *argv[]) "Expect more bugs than usual."); } + { + rust_str_t rust_str = rust_welcome_string(); + const char *s = rust_str_get(rust_str); + if (strlen(s) > 0) { + log_notice(LD_GENERAL, "%s", s); + } + rust_str_free(rust_str); + } + if (network_init()<0) { log_err(LD_BUG,"Error initializing network; exiting."); return -1; |