diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/inspsocket.cpp | 4 | ||||
-rw-r--r-- | src/modules/extra/m_pgsql.cpp | 15 |
2 files changed, 11 insertions, 8 deletions
diff --git a/src/inspsocket.cpp b/src/inspsocket.cpp index fb9238a97..eb0ee86c8 100644 --- a/src/inspsocket.cpp +++ b/src/inspsocket.cpp @@ -356,8 +356,8 @@ bool InspSocket::FlushWriteBuffer() this->Instance->Log(DEBUG,"Write error on socket: %s",strerror(errno)); this->OnError(I_ERR_WRITE); this->state = I_ERROR; - ServerInstance->SE->DelFd(this->sock); - this->sock->Close(); + this->Instance->SE->DelFd(this); + this->Close(); return true; } } diff --git a/src/modules/extra/m_pgsql.cpp b/src/modules/extra/m_pgsql.cpp index 1790fdfef..ed068fdf1 100644 --- a/src/modules/extra/m_pgsql.cpp +++ b/src/modules/extra/m_pgsql.cpp @@ -69,13 +69,13 @@ enum SQLstatus { CREAD, CWRITE, WREAD, WWRITE, RREAD, RWRITE }; class SQLhost { public: - std::string id; /* Database handle id */ - std::string host; /* Database server hostname */ + std::string id; /* Database handle id */ + std::string host; /* Database server hostname */ unsigned int port; /* Database server port */ - std::string name; /* Database name */ - std::string user; /* Database username */ - std::string pass; /* Database password */ - bool ssl; /* If we should require SSL */ + std::string name; /* Database name */ + std::string user; /* Database username */ + std::string pass; /* Database password */ + bool ssl; /* If we should require SSL */ SQLhost() { @@ -847,6 +847,9 @@ bool SQLConn::DoConnectedPoll() { /* ..and the result */ PgSQLresult reply(us, to, query.id, result); + + /* Fix by brain, make sure the original query gets sent back in the reply */ + reply.query = query.query.q; Instance->Log(DEBUG, "Got result, status code: %s; error message: %s", PQresStatus(PQresultStatus(result)), PQresultErrorMessage(result)); |