From ab2c48b5c1dc2da0ef220c90446f32f15c2284fd Mon Sep 17 00:00:00 2001 From: brain Date: Thu, 15 Dec 2005 20:41:02 +0000 Subject: Output buffering fixes git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2494 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/socket.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/socket.cpp b/src/socket.cpp index 7be61c9d4..561435a2a 100644 --- a/src/socket.cpp +++ b/src/socket.cpp @@ -177,6 +177,7 @@ int InspSocket::Write(std::string data) { this->Buffer = this->Buffer + data; this->FlushWriteBuffer(); + return data.length(); } void InspSocket::FlushWriteBuffer() @@ -184,7 +185,7 @@ void InspSocket::FlushWriteBuffer() int result = 0; if (this->Buffer.length()) { - result = send(this->fd,this->Buffer,this->Buffer.length(),0); + result = send(this->fd,this->Buffer.c_str(),this->Buffer.length(),0); if (result > 0) { /* If we wrote some, advance the buffer forwards */ -- cgit v1.2.3