From 7ae96519141a7aac4ef2597fb2eed75643f9c1bf Mon Sep 17 00:00:00 2001 From: brain Date: Sat, 11 Mar 2006 18:31:48 +0000 Subject: Checking that buffers are empty in destructor git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3672 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/socket.cpp | 3 ++- src/svn-rev.sh | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/socket.cpp b/src/socket.cpp index a1f322b50..4ae2f6768 100644 --- a/src/socket.cpp +++ b/src/socket.cpp @@ -278,7 +278,7 @@ bool InspSocket::FlushWriteBuffer() } else { - outbuffer[0] = outbuffer[0].substr(result + 1,outbuffer[0].length()); + outbuffer[0] = outbuffer[0].substr(result + 1,outbuffer[0].length() - result); } } else if ((result == -1) && (errno != EAGAIN)) @@ -398,5 +398,6 @@ void InspSocket::OnClose() { return; } InspSocket::~InspSocket() { + outbuffer.clear(); this->Close(); } diff --git a/src/svn-rev.sh b/src/svn-rev.sh index cf2461114..0295427fb 100755 --- a/src/svn-rev.sh +++ b/src/svn-rev.sh @@ -1 +1 @@ -echo 3669 +echo 3671 -- cgit v1.2.3