summaryrefslogtreecommitdiff
path: root/src/modules/extra
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/extra')
-rw-r--r--src/modules/extra/m_pgsql.cpp6
-rw-r--r--src/modules/extra/m_sqlv2.h5
2 files changed, 6 insertions, 5 deletions
diff --git a/src/modules/extra/m_pgsql.cpp b/src/modules/extra/m_pgsql.cpp
index adabfb52c..49a481912 100644
--- a/src/modules/extra/m_pgsql.cpp
+++ b/src/modules/extra/m_pgsql.cpp
@@ -209,8 +209,8 @@ class PgSQLresult : public SQLresult
SQLfieldList* fieldlist;
SQLfieldMap* fieldmap;
public:
- PgSQLresult(Module* self, Module* to, PGresult* result)
- : SQLresult(self, to), res(result), currentrow(0), fieldlist(NULL), fieldmap(NULL)
+ PgSQLresult(Module* self, Module* to, unsigned long id, PGresult* result)
+ : SQLresult(self, to, id), res(result), currentrow(0), fieldlist(NULL), fieldmap(NULL)
{
int rows = PQntuples(res);
int cols = PQnfields(res);
@@ -787,7 +787,7 @@ bool SQLConn::DoConnectedPoll()
/* ..and the result */
log(DEBUG, "Got result, status code: %s; error message: %s", PQresStatus(PQresultStatus(result)), PQresultErrorMessage(result));
- PgSQLresult reply(us, to, result);
+ PgSQLresult reply(us, to, query.id, result);
reply.Send();
diff --git a/src/modules/extra/m_sqlv2.h b/src/modules/extra/m_sqlv2.h
index 75d7eb093..3635129d5 100644
--- a/src/modules/extra/m_sqlv2.h
+++ b/src/modules/extra/m_sqlv2.h
@@ -156,9 +156,10 @@ public:
std::string query;
std::string dbid;
SQLerror error;
+ unsigned long id;
- SQLresult(Module* s, Module* d)
- : Request(SQLRESID, s, d)
+ SQLresult(Module* s, Module* d, unsigned long i)
+ : Request(SQLRESID, s, d), id(i)
{
}