summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--changes/bug39635
-rw-r--r--changes/bug43537
-rw-r--r--changes/bug45213
-rw-r--r--src/common/compat.h2
-rw-r--r--src/common/util.c2
-rw-r--r--src/or/config.c9
-rw-r--r--src/or/ntmain.c2
7 files changed, 28 insertions, 2 deletions
diff --git a/changes/bug3963 b/changes/bug3963
new file mode 100644
index 0000000000..2fc44a095c
--- /dev/null
+++ b/changes/bug3963
@@ -0,0 +1,5 @@
+ o Minor bugfixes:
+ - When configuring, starting, or stopping an NT service, stop
+ immediately after the service configuration attempt has succeeded
+ or failed. Fixes bug3963; bugfix on 0.2.0.7-alpha.
+
diff --git a/changes/bug4353 b/changes/bug4353
new file mode 100644
index 0000000000..5e80c902c8
--- /dev/null
+++ b/changes/bug4353
@@ -0,0 +1,7 @@
+ o Minor bugfixes:
+ - When running as client without a geoip database, do not print a
+ misleading (and plain wrong) log message that we're collecting
+ dirreq statistics - we're not collecting statistics as clients.
+ Also don't create a useless (because empty) stats file in the
+ stats/ directory. Fixes bug 4353, bugfix on 0.2.2.34.
+
diff --git a/changes/bug4521 b/changes/bug4521
new file mode 100644
index 0000000000..9b0bae9b00
--- /dev/null
+++ b/changes/bug4521
@@ -0,0 +1,3 @@
+ o Minor bugfixes:
+ - Backport fixes for a pair of compilation warnings on Windows.
+ Fixes bug 4521; bugfix on 0.2.2.28-beta and on 0.2.2.29-beta.
diff --git a/src/common/compat.h b/src/common/compat.h
index 7e6058a547..011b9c8674 100644
--- a/src/common/compat.h
+++ b/src/common/compat.h
@@ -396,7 +396,7 @@ typedef int socklen_t;
#ifdef MS_WINDOWS
#define tor_socket_t intptr_t
-#define SOCKET_OK(s) ((s) != INVALID_SOCKET)
+#define SOCKET_OK(s) ((unsigned)(s) != INVALID_SOCKET)
#else
#define tor_socket_t int
#define SOCKET_OK(s) ((s) >= 0)
diff --git a/src/common/util.c b/src/common/util.c
index de1ca3684d..7675ede433 100644
--- a/src/common/util.c
+++ b/src/common/util.c
@@ -1698,6 +1698,8 @@ check_private_dir(const char *dirname, cpd_check_t check,
struct passwd *pw = NULL;
uid_t running_uid;
gid_t running_gid;
+#else
+ (void)effective_user;
#endif
tor_assert(dirname);
diff --git a/src/or/config.c b/src/or/config.c
index ca4e71cccd..ffa763e65c 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -1414,6 +1414,15 @@ options_act(or_options_t *old_options)
options->EntryStatistics || options->ExitPortStatistics) {
time_t now = time(NULL);
int print_notice = 0;
+
+ /* If we aren't acting as a server, we can't collect stats anyway. */
+ if (!server_mode(options)) {
+ options->CellStatistics = 0;
+ options->DirReqStatistics = 0;
+ options->EntryStatistics = 0;
+ options->ExitPortStatistics = 0;
+ }
+
if ((!old_options || !old_options->CellStatistics) &&
options->CellStatistics) {
rep_hist_buffer_stats_init(now);
diff --git a/src/or/ntmain.c b/src/or/ntmain.c
index b2fee648cc..985fab73ca 100644
--- a/src/or/ntmain.c
+++ b/src/or/ntmain.c
@@ -728,6 +728,7 @@ nt_service_parse_options(int argc, char **argv, int *should_exit)
if ((argc >= 3) &&
(!strcmp(argv[1], "-service") || !strcmp(argv[1], "--service"))) {
nt_service_loadlibrary();
+ *should_exit = 1;
if (!strcmp(argv[2], "install"))
return nt_service_install(argc, argv);
if (!strcmp(argv[2], "remove"))
@@ -737,7 +738,6 @@ nt_service_parse_options(int argc, char **argv, int *should_exit)
if (!strcmp(argv[2], "stop"))
return nt_service_cmd_stop();
printf("Unrecognized service command '%s'\n", argv[2]);
- *should_exit = 1;
return 1;
}
if (argc >= 2) {