Explicitly prevent use of FEATURE_CONNECTION_SHARING without FEATURE_CONNECTION_KEEP_...
authorFabian Keil <fk@fabiankeil.de>
Wed, 26 Aug 2020 14:59:36 +0000 (16:59 +0200)
committerFabian Keil <fk@fabiankeil.de>
Tue, 1 Sep 2020 10:22:42 +0000 (12:22 +0200)
It makes no sense and does not compile anyway.

Sponsored by: Robert Klemme

gateway.c

index 64ba523..46db1e3 100644 (file)
--- a/gateway.c
+++ b/gateway.c
@@ -129,6 +129,9 @@ struct socks_reply {
 static const char socks_userid[] = "anonymous";
 
 #ifdef FEATURE_CONNECTION_SHARING
+#ifndef FEATURE_CONNECTION_KEEP_ALIVE
+#error Using FEATURE_CONNECTION_SHARING without FEATURE_CONNECTION_KEEP_ALIVE is impossible
+#endif
 
 #define MAX_REUSABLE_CONNECTIONS 100