diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-09-07 20:20:39 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-09-07 20:20:39 +0000 |
commit | be28c7f3c74f5f856be74ebef88316bc69c583b9 (patch) | |
tree | 21bbffc1e9967a657ddab1b2a9157e3d7ebd623c /src/modules/extra | |
parent | 74e622fbfa004b3c3363fc7bc83ae322c4eb3c5c (diff) |
1) Make earlier fix to inspsocket actually compile without error
2) Make sure that query string is sent back in the reply
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5155 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/extra')
-rw-r--r-- | src/modules/extra/m_pgsql.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
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)); |