aboutsummaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorGeorge Kadianakis <desnacked@gmail.com>2011-08-15 17:26:03 +0200
committerGeorge Kadianakis <desnacked@gmail.com>2011-08-15 17:26:03 +0200
commitdb4cde38109c677db14316ac77c240d7d61db386 (patch)
tree9ec5a30c649cdd5962eaadabc0fed1be5b6fdbbf /src/common
parentea3e9416c6c579735ff2b844a88605ae5e1cbbd2 (diff)
downloadtor-db4cde38109c677db14316ac77c240d7d61db386.tar
tor-db4cde38109c677db14316ac77c240d7d61db386.tar.gz
Improve the code a tad.
* Use strcmpstart() instead of strcmp(x,y,strlen(y)). * Warn the user if the managed proxy failed to launch. * Improve function documentation. * Use smartlist_len() instead of n_unconfigured_proxies. * Split managed_proxy_destroy() to managed_proxy_destroy() and managed_proxy_destroy_with_transports(). * Constification.
Diffstat (limited to 'src/common')
-rw-r--r--src/common/util.c2
-rw-r--r--src/common/util.h1
2 files changed, 1 insertions, 2 deletions
diff --git a/src/common/util.c b/src/common/util.c
index 7a7ee195b..0632c674e 100644
--- a/src/common/util.c
+++ b/src/common/util.c
@@ -2941,8 +2941,6 @@ format_helper_exit_status(unsigned char child_state, int saved_errno,
#define CHILD_STATE_EXEC 8
#define CHILD_STATE_FAILEXEC 9
-#define SPAWN_ERROR_MESSAGE "ERR: Failed to spawn background process - code "
-
/** Start a program in the background. If <b>filename</b> contains a '/',
* then it will be treated as an absolute or relative path. Otherwise the
* system path will be searched for <b>filename</b>. The strings in
diff --git a/src/common/util.h b/src/common/util.h
index 12dc106ac..8bf4f7b13 100644
--- a/src/common/util.h
+++ b/src/common/util.h
@@ -353,6 +353,7 @@ void tor_check_port_forwarding(const char *filename,
int tor_spawn_background(const char *const filename, int *stdout_read,
int *stderr_read, const char **argv,
const char **envp);
+#define SPAWN_ERROR_MESSAGE "ERR: Failed to spawn background process - code "
#ifdef MS_WINDOWS
HANDLE load_windows_system_library(const TCHAR *library_name);