From db4cde38109c677db14316ac77c240d7d61db386 Mon Sep 17 00:00:00 2001 From: George Kadianakis Date: Mon, 15 Aug 2011 17:26:03 +0200 Subject: 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. --- src/or/transports.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/or/transports.h') diff --git a/src/or/transports.h b/src/or/transports.h index c75797d217..6fec1dcf7c 100644 --- a/src/or/transports.h +++ b/src/or/transports.h @@ -11,7 +11,7 @@ #ifndef TOR_TRANSPORTS_H #define TOR_TRANSPORTS_H -void pt_kickstart_proxy(char *method, char **proxy_argv, +void pt_kickstart_proxy(const char *method, char **proxy_argv, int is_server); #define pt_kickstart_client_proxy(m, pa) \ @@ -51,12 +51,12 @@ typedef struct { smartlist_t *transports; /* list of transport_t this proxy spawned */ } managed_proxy_t; -int parse_cmethod_line(char *line, managed_proxy_t *mp); -int parse_smethod_line(char *line, managed_proxy_t *mp); +int parse_cmethod_line(const char *line, managed_proxy_t *mp); +int parse_smethod_line(const char *line, managed_proxy_t *mp); -int parse_version(char *line, managed_proxy_t *mp); -void parse_env_error(char *line); -void handle_proxy_line(char *line, managed_proxy_t *mp); +int parse_version(const char *line, managed_proxy_t *mp); +void parse_env_error(const char *line); +void handle_proxy_line(const char *line, managed_proxy_t *mp); #endif -- cgit v1.2.3-54-g00ecf