summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-07-22 00:25:41 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-07-22 00:25:41 +0000
commitec787f412eddfa97e73c17a1ecad0b9e1b3efc06 (patch)
tree09ca47826460b12eb311ecd0682187379409ca3f /src/modules
parent472edb6bef1b0f1c828db2cd727a279b5d71f817 (diff)
Works now (again, to a point)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4485 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/extra/m_mysql.cpp11
1 files changed, 7 insertions, 4 deletions
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;