Remove a superfluos log message in forget_connection()
authorFabian Keil <fk@fabiankeil.de>
Sun, 16 Oct 2011 12:37:12 +0000 (12:37 +0000)
committerFabian Keil <fk@fabiankeil.de>
Sun, 16 Oct 2011 12:37:12 +0000 (12:37 +0000)
As a bonus this simplifies the connection_reuse_mutex locking.

gateway.c

index 9ab19d5..851665a 100644 (file)
--- a/gateway.c
+++ b/gateway.c
@@ -1,4 +1,4 @@
-const char gateway_rcs[] = "$Id: gateway.c,v 1.77 2011/09/06 18:46:17 fabiankeil Exp $";
+const char gateway_rcs[] = "$Id: gateway.c,v 1.78 2011/09/18 14:42:43 fabiankeil Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/gateway.c,v $
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/gateway.c,v $
@@ -338,16 +338,12 @@ void forget_connection(jb_socket sfd)
             sfd, reusable_connection[slot].host,
             reusable_connection[slot].port, slot);
          mark_connection_closed(&reusable_connection[slot]);
             sfd, reusable_connection[slot].host,
             reusable_connection[slot].port, slot);
          mark_connection_closed(&reusable_connection[slot]);
-         privoxy_mutex_unlock(&connection_reuse_mutex);
-
-         return;
+         break;
       }
    }
 
       }
    }
 
-   log_error(LOG_LEVEL_CONNECT,
-      "Socket %d already forgotten or never remembered.", sfd);
-
    privoxy_mutex_unlock(&connection_reuse_mutex);
    privoxy_mutex_unlock(&connection_reuse_mutex);
+
 }
 #endif /* def FEATURE_CONNECTION_SHARING */
 
 }
 #endif /* def FEATURE_CONNECTION_SHARING */