summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2011-04-29 18:03:04 -0400
committerAdam <Adam@anope.org>2011-04-29 18:03:04 -0400
commit036b3c9053d663b0714690db33161e2df9e76782 (patch)
tree867e85a3241b3618911e8dd7e1d8fc5b1bd0c150
parent7da33344d10f4323d9811c68398fe8bb836979b1 (diff)
Temporary fix for /os restart with m_async_commands loaded, is fixed properly in 1.9.5
-rw-r--r--modules/extra/m_async_commands.cpp2
-rw-r--r--modules/extra/m_ssl.cpp4
-rw-r--r--src/sockets.cpp2
3 files changed, 5 insertions, 3 deletions
diff --git a/modules/extra/m_async_commands.cpp b/modules/extra/m_async_commands.cpp
index b2c552351..a7153b25f 100644
--- a/modules/extra/m_async_commands.cpp
+++ b/modules/extra/m_async_commands.cpp
@@ -150,6 +150,8 @@ class ModuleAsynchCommands : public Module, public Pipe, public AsynchCommandsSe
}
else if (current_command)
return EVENT_CONTINUE;
+ else if (command->name == "RESTART")
+ return EVENT_CONTINUE;
CommandSource source_copy = source;
AsynchCommandMutex *cm = new AsynchCommandMutex(source_copy, command, params);
diff --git a/modules/extra/m_ssl.cpp b/modules/extra/m_ssl.cpp
index 408ebf609..21362d1e7 100644
--- a/modules/extra/m_ssl.cpp
+++ b/modules/extra/m_ssl.cpp
@@ -202,14 +202,14 @@ SSLSocketIO::SSLSocketIO()
int SSLSocketIO::Recv(Socket *s, char *buf, size_t sz) const
{
- size_t i = SSL_read(this->sslsock, buf, sz);
+ int i = SSL_read(this->sslsock, buf, sz);
TotalRead += i;
return i;
}
int SSLSocketIO::Send(Socket *s, const Anope::string &buf) const
{
- size_t i = SSL_write(this->sslsock, buf.c_str(), buf.length());
+ int i = SSL_write(this->sslsock, buf.c_str(), buf.length());
TotalWritten += i;
return i;
}
diff --git a/src/sockets.cpp b/src/sockets.cpp
index 3f334e26e..cdf713f81 100644
--- a/src/sockets.cpp
+++ b/src/sockets.cpp
@@ -522,7 +522,7 @@ bool BufferedSocket::ProcessWrite()
if (this->WriteBuffer.empty())
return true;
int count = this->IO->Send(this, this->WriteBuffer);
- if (count == -1)
+ if (count <= -1)
return false;
this->WriteBuffer = this->WriteBuffer.substr(count);
if (this->WriteBuffer.empty())