summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-03-11 18:31:48 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-03-11 18:31:48 +0000
commit7ae96519141a7aac4ef2597fb2eed75643f9c1bf (patch)
treec3287f0f6d698d2ba8f0f45a773ceb3cf5333ae0
parent949712aebaffd70e18bbaf45132bd73313becc6d (diff)
Checking that buffers are empty in destructor
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3672 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/socket.cpp3
-rwxr-xr-xsrc/svn-rev.sh2
2 files changed, 3 insertions, 2 deletions
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