summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobert James Kaes <rjkaes@users.sourceforge.net>2003-01-27 18:42:18 +0000
committerRobert James Kaes <rjkaes@users.sourceforge.net>2003-01-27 18:42:18 +0000
commit2fc9c7696991a3e88d2e0c404c1953acadc9756a (patch)
tree463bd1893b70212257b169e55da3829af373a00c /src
parentcb7e3eef04f7069edaa248bcb35d6b86b8266df8 (diff)
downloadtinyproxy-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 'src')
-rw-r--r--src/reqs.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/reqs.c b/src/reqs.c
index d9ceb52..da279d0 100644
--- a/src/reqs.c
+++ b/src/reqs.c
@@ -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