Browse Source

Don't setup TOR proxy unless TOR proxy address is specified on the command-line, otherwise a segfault occurs.

pull/1/head
Mark Friedenbach 12 years ago
parent
commit
6ae3073173
  1. 2
      main.cpp

2
main.cpp

@ -349,11 +349,13 @@ int main(int argc, char **argv) {
setbuf(stdout, NULL); setbuf(stdout, NULL);
CDnsSeedOpts opts; CDnsSeedOpts opts;
opts.ParseCommandLine(argc, argv); opts.ParseCommandLine(argc, argv);
if (opts.tor) {
CService service(opts.tor, 9050); CService service(opts.tor, 9050);
if (service.IsValid()) { if (service.IsValid()) {
printf("Using Tor proxy at %s\n", service.ToStringIPPort().c_str()); printf("Using Tor proxy at %s\n", service.ToStringIPPort().c_str());
SetProxy(NET_TOR, service); SetProxy(NET_TOR, service);
} }
}
bool fDNS = true; bool fDNS = true;
if (!opts.ns) { if (!opts.ns) {
printf("No nameserver set. Not starting DNS server.\n"); printf("No nameserver set. Not starting DNS server.\n");

Loading…
Cancel
Save