--------------------- PatchSet 7643 Date: 2008/03/25 08:55:17 Author: chtsanti Branch: async-calls Tag: (none) Log: Convert some asserts to Must calls Members: src/tunnel.cc:1.33.4.3->1.33.4.4 Index: squid3/src/tunnel.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/tunnel.cc,v retrieving revision 1.33.4.3 retrieving revision 1.33.4.4 diff -u -r1.33.4.3 -r1.33.4.4 --- squid3/src/tunnel.cc 25 Mar 2008 08:41:51 -0000 1.33.4.3 +++ squid3/src/tunnel.cc 25 Mar 2008 08:55:17 -0000 1.33.4.4 @@ -1,6 +1,6 @@ /* - * $Id: tunnel.cc,v 1.33.4.3 2008/03/25 08:41:51 chtsanti Exp $ + * $Id: tunnel.cc,v 1.33.4.4 2008/03/25 08:55:17 chtsanti Exp $ * * DEBUG: section 26 Secure Sockets Layer Proxy * AUTHOR: Duane Wessels @@ -140,7 +140,7 @@ TunnelStateData::tunnelServerClosed(const CommCloseCbParams &io) { debugs(26, 3, "tunnelServerClosed: FD " << io.fd); - assert(io.fd == server.fd()); + Must(io.fd == server.fd()); server.fd(-1); if (noConnections()) { @@ -158,7 +158,7 @@ TunnelStateData::tunnelClientClosed(const CommCloseCbParams &io) { debugs(26, 3, "tunnelClientClosed: FD " << io.fd); - assert(io.fd == client.fd()); + Must(io.fd == client.fd()); client.fd(-1); if (noConnections()) { @@ -173,7 +173,7 @@ } void TunnelStateData::close() { - assert(noConnections()); + Must(noConnections()); safe_free(url); FwdState::serversFree(&servers); host = NULL; @@ -270,7 +270,7 @@ TunnelStateData::readClient(const CommIoCbParams &io) { - assert(io.fd == client.fd()); + Must(io.fd == client.fd()); /* * Bail out early on COMM_ERR_CLOSING @@ -328,7 +328,7 @@ void TunnelStateData::writeServerDone(const CommIoCbParams &io) { - assert(io.fd == server.fd()); + Must(io.fd == server.fd()); debugs(26, 3, "tunnelWriteServer: FD " << server.fd() << ", " << io.size << " bytes written"); @@ -371,7 +371,7 @@ void TunnelStateData::Connection::dataSent (size_t amount) { - assert(amount == (size_t)len); + Must(amount == (size_t)len); len =0; /* increment total object size */ @@ -382,7 +382,7 @@ void TunnelStateData::writeClientDone(const CommIoCbParams &io) { - assert(io.fd == client.fd()); + Must(io.fd == client.fd()); debugs(26, 3, "tunnelWriteClient: FD " << client.fd() << ", " << io.size << " bytes written"); @@ -442,7 +442,7 @@ void TunnelStateData::copyRead(Connection &from, AsyncCall::Pointer call) { - assert(from.len == 0); + Must(from.len == 0); comm_read(from.fd(), from.buf, from.bytesWanted(1, SQUID_TCP_SO_RCVBUF), call); }