X-Git-Url: http://www.privoxy.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=gateway.c;h=46db1e32f64ec4063481e4f561db6488ecd9c25c;hb=998def6e7a20bdf0a14b0177d9668a6c76fac19b;hp=03e56ee35b50cbb329e1f228c7e0f3d0582f2d7f;hpb=d01bb4028a9d19a62672a8d7d8d13f09ae270851;p=privoxy.git diff --git a/gateway.c b/gateway.c index 03e56ee3..46db1e32 100644 --- a/gateway.c +++ b/gateway.c @@ -7,7 +7,7 @@ * or SOCKS5 proxy). * * Copyright : Written by and Copyright (C) 2001-2017 the - * Privoxy team. http://www.privoxy.org/ + * Privoxy team. https://www.privoxy.org/ * * Based on the Internet Junkbuster originally written * by and Copyright (C) 1997 Anonymous Coders and @@ -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 @@ -218,6 +221,7 @@ void remember_connection(const struct reusable_connection *connection) return; } + assert(slot < SZ(reusable_connection)); assert(NULL != connection->host); reusable_connection[slot].host = strdup_or_die(connection->host); reusable_connection[slot].sfd = connection->sfd;