From: Alex Rousskov Date: Tue, 6 Sep 2011 17:56:10 +0000 (-0600) Subject: Marked comm_reset_close() parameter as const because it is. X-Git-Tag: take08~24^2~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8ace824c62f43e7df8a47516f72ae35107ef7504;p=thirdparty%2Fsquid.git Marked comm_reset_close() parameter as const because it is. This allows const methods to call this Comm function with their conn member. --- diff --git a/src/comm.cc b/src/comm.cc index 4b0938510b..5d40c6f3f5 100644 --- a/src/comm.cc +++ b/src/comm.cc @@ -1021,7 +1021,7 @@ comm_lingering_close(int fd) * closed, TCP generates a RESET */ void -comm_reset_close(Comm::ConnectionPointer &conn) +comm_reset_close(const Comm::ConnectionPointer &conn) { struct linger L; L.l_onoff = 1; diff --git a/src/comm.h b/src/comm.h index c4355e5975..98c58e403b 100644 --- a/src/comm.h +++ b/src/comm.h @@ -19,7 +19,7 @@ SQUIDCEXTERN void commSetTcpKeepalive(int fd, int idle, int interval, int timeou extern void _comm_close(int fd, char const *file, int line); #define comm_close(x) (_comm_close((x), __FILE__, __LINE__)) SQUIDCEXTERN void old_comm_reset_close(int fd); -SQUIDCEXTERN void comm_reset_close(Comm::ConnectionPointer &conn); +SQUIDCEXTERN void comm_reset_close(const Comm::ConnectionPointer &conn); #if LINGERING_CLOSE SQUIDCEXTERN void comm_lingering_close(int fd); #endif