]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Works now (again, to a point)
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Sat, 22 Jul 2006 00:25:41 +0000 (00:25 +0000)
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Sat, 22 Jul 2006 00:25:41 +0000 (00:25 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4485 e03df62e-2008-0410-955e-edbf42e46eb7

src/modules/extra/m_mysql.cpp

index ad544b5a8eb951b6061b849455b6db7d8b72524d..486b7e2f475c8a3add2da7065b8afac87736386c 100644 (file)
@@ -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;