}
};
+/** Used to resolve sql server hostnames
+ */
class SQLresolver : public Resolver
{
private:
ModulePgSQL* mod;
public:
SQLresolver(ModulePgSQL* m, InspIRCd* Instance, const SQLhost& hi)
- : Resolver(Instance, hi.host, DNS_QUERY_FORWARD), host(hi), mod(m)
+ : Resolver(Instance, hi.host, DNS_QUERY_FORWARD, (Module*)m), host(hi), mod(m)
{
}
virtual Version GetVersion()
{
- return Version(1, 0, 0, 0, VF_VENDOR|VF_SERVICEPROVIDER, API_VERSION);
+ return Version(1, 1, 0, 0, VF_VENDOR|VF_SERVICEPROVIDER, API_VERSION);
}
virtual ~ModulePgSQL()
#ifdef PGSQL_HAS_ESCAPECONN
len = PQescapeStringConn(sql, queryend, req.query.p.front().c_str(), req.query.p.front().length(), &error);
#else
- len = PQescapeStringConn(queryend, req.query.p.front().c_str(), req.query.p.front().length());
- error = 0;
+ len = PQescapeString (queryend, req.query.p.front().c_str(), req.query.p.front().length());
#endif
if(error)
{
{
Instance->Log(DEBUG, "Dispatched query successfully");
qinprog = true;
- DELETE(query);
+ delete[] query;
return SQLerror();
}
else
{
Instance->Log(DEBUG, "Failed to dispatch query: %s", PQerrorMessage(sql));
- DELETE(query);
+ delete[] query;
return SQLerror(QSEND_FAIL, PQerrorMessage(sql));
}
}