diff options
author | Robert James Kaes <rjkaes@users.sourceforge.net> | 2003-01-27 18:42:18 +0000 |
---|---|---|
committer | Robert James Kaes <rjkaes@users.sourceforge.net> | 2003-01-27 18:42:18 +0000 |
commit | 2fc9c7696991a3e88d2e0c404c1953acadc9756a (patch) | |
tree | 463bd1893b70212257b169e55da3829af373a00c /src | |
parent | cb7e3eef04f7069edaa248bcb35d6b86b8266df8 (diff) | |
download | tinyproxy-2fc9c7696991a3e88d2e0c404c1953acadc9756a.tar.gz tinyproxy-2fc9c7696991a3e88d2e0c404c1953acadc9756a.zip |
(connect_to_upstream): Reorganized the preprocessor directives to make
sure the function's symbol name is stored, even if upstream was not
compiled it. This should keep some compilers from reporting errors.
Diffstat (limited to '')
-rw-r--r-- | src/reqs.c | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -1,4 +1,4 @@ -/* $Id: reqs.c,v 1.90 2003-01-27 17:39:02 rjkaes Exp $ +/* $Id: reqs.c,v 1.91 2003-01-27 18:42:18 rjkaes Exp $ * * This is where all the work in tinyproxy is actually done. Incoming * connections have a new child created for them. The child then @@ -1149,13 +1149,20 @@ relay_connection(struct conn_s *connptr) return; } -#ifdef UPSTREAM_SUPPORT /* * Establish a connection to the upstream proxy server. */ static int connect_to_upstream(struct conn_s *connptr, struct request_s *request) { +#ifndef UPSTREAM_SUPPORT + /* + * This function does nothing if upstream support was not compiled + * into tinyproxy. + */ + return -1; +#endif + char *combined_string; int len; @@ -1204,7 +1211,6 @@ connect_to_upstream(struct conn_s *connptr, struct request_s *request) return establish_http_connection(connptr, request); } -#endif /* * This is the main drive for each connection. As you can tell, for the |