From ec787f412eddfa97e73c17a1ecad0b9e1b3efc06 Mon Sep 17 00:00:00 2001 From: brain Date: Sat, 22 Jul 2006 00:25:41 +0000 Subject: Works now (again, to a point) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4485 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/extra/m_mysql.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/modules/extra') diff --git a/src/modules/extra/m_mysql.cpp b/src/modules/extra/m_mysql.cpp index ad544b5a8..486b7e2f4 100644 --- a/src/modules/extra/m_mysql.cpp +++ b/src/modules/extra/m_mysql.cpp @@ -216,7 +216,7 @@ class MySQLresult : public SQLresult log(DEBUG, "Created new MySQL result; %d rows, %d columns", rows, cols); } - MySQLresult(Module* self, Module* to, SQLerror e) : SQLresult(self, to) + MySQLresult(Module* self, Module* to, SQLerror e) : SQLresult(self, to), currentrow(0), rows(0), cols(0) { error = e; } @@ -582,7 +582,10 @@ void NotifyMainThread(SQLConnection* connection_with_new_result) * connection back. */ log(DEBUG,"Notify of result on connection: %s",connection_with_new_result->GetID().c_str()); - write(QueueFD, connection_with_new_result->GetID().c_str(), connection_with_new_result->GetID().length()+1); // add one for null terminator + if (send(QueueFD, connection_with_new_result->GetID().c_str(), connection_with_new_result->GetID().length()+1, 0) < 1) // add one for null terminator + { + log(DEBUG,"Error writing to QueueFD: %s",strerror(errno)); + } log(DEBUG,"Sent it on its way via fd=%d",QueueFD); } @@ -606,7 +609,7 @@ class Notifier : public InspSocket } } - Notifier(int newfd, char* ip, Server* S) : Srv(S) + Notifier(int newfd, char* ip, Server* S) : InspSocket(newfd, ip), Srv(S) { log(DEBUG,"Constructor of new socket"); } @@ -619,7 +622,7 @@ class Notifier : public InspSocket virtual int OnIncomingConnection(int newsock, char* ip) { - log(DEBUG,"Inbound connection!"); + log(DEBUG,"Inbound connection on fd %d!",newsock); Notifier* n = new Notifier(newsock, ip, Srv); Srv->AddSocket(n); return true; -- cgit v1.2.3