-const char gateway_rcs[] = "$Id: gateway.c,v 1.44 2008/11/22 11:54:04 fabiankeil Exp $";
+const char gateway_rcs[] = "$Id: gateway.c,v 1.45 2008/12/04 18:17:07 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/gateway.c,v $
*
* Revisions :
* $Log: gateway.c,v $
+ * Revision 1.45 2008/12/04 18:17:07 fabiankeil
+ * Fix some cparser warnings.
+ *
* Revision 1.44 2008/11/22 11:54:04 fabiankeil
* Move log message around to include the socket number.
*
* Function : connection_destination_matches
*
* Description : Determines whether a remembered connection can
- * be reused. That is whether the destination and
+ * be reused. That is, whether the destination and
* the forwarding settings match.
*
* Parameters :
const struct http_request *http,
const struct forward_spec *fwd)
{
- /* XXX: Start of duplicated checks for debugging purposes. */
- if (strcmpic(connection->host, http->host))
- {
- return FALSE;
- }
-
- if (connection->forwarder_type != fwd->type)
- {
- log_error(LOG_LEVEL_CONNECT, "Type mismatch: %d %d (%s)",
- connection->forwarder_type, fwd->type, http->host);
- return FALSE;
- }
- if (connection->gateway_port != fwd->gateway_port)
- {
- log_error(LOG_LEVEL_CONNECT, "Gateway port mismatch: %d %d (%s)",
- connection->gateway_port, fwd->gateway_port, http->host);
- return FALSE;
- }
- if (connection->forward_port != fwd->forward_port)
- {
- log_error(LOG_LEVEL_CONNECT, "Forward port mismatch: %d %d (%s)",
- connection->forward_port, fwd->forward_port, http->host);
- return FALSE;
- }
- if (connection->port != http->port)
- {
- log_error(LOG_LEVEL_CONNECT, "Server port mismatch: %d %d (%s)",
- connection->port, http->port, http->host);
- return FALSE;
- }
-
- /* XXX: End of duplicated checks for debugging purposes. */
-
if ((connection->forwarder_type != fwd->type)
|| (connection->gateway_port != fwd->gateway_port)
|| (connection->forward_port != fwd->forward_port)