* ---------------------------------------------------
*/
+/* Stop mysql wanting to use long long */
+#define NO_CLIENT_LONG_LONG
+
#include "inspircd.h"
#include <mysql.h>
#include <pthread.h>
/* $CompileFlags: exec("mysql_config --include") */
/* $LinkerFlags: exec("mysql_config --libs_r") rpath("mysql_config --libs_r") */
/* $ModDep: m_sqlv2.h */
-/* $NoPedantic */
/* THE NONBLOCKING MYSQL API!
*
{
/* XXX: MUTEX */
pthread_mutex_lock(&logging_mutex);
- ServerInstance->Log(DEFAULT,"SQL: Failed to connect database "+i->second->GetHost()+": Error: "+i->second->GetError());
+ ServerInstance->Logs->Log("m_mysql",DEFAULT,"SQL: Failed to connect database "+i->second->GetHost()+": Error: "+i->second->GetError());
i->second->SetEnable(false);
pthread_mutex_unlock(&logging_mutex);
}
rc = pthread_join(Dispatcher, &status);
if (rc)
{
- ServerInstance->Log(DEFAULT,"SQL: Error code from pthread_join() is " + rc);
+ ServerInstance->Logs->Log("m_mysql",DEFAULT,"SQL: Error code from pthread_join() is %d", rc);
}
throw ModuleException("m_mysql: Unable to publish feature 'SQL'");
}
rc = pthread_join(Dispatcher, &status);
if (rc)
{
- ServerInstance->Log(DEFAULT,"SQL: Error code from pthread_join() is " + rc);
+ ServerInstance->Logs->Log("m_mysql",DEFAULT,"SQL: Error code from pthread_join() is %d", rc);
}
ClearAllConnections();
delete Conf;
virtual Version GetVersion()
{
- return Version(1,1,0,0,VF_VENDOR|VF_SERVICEPROVIDER,API_VERSION);
+ return Version(1,2,0,0,VF_VENDOR|VF_SERVICEPROVIDER,API_VERSION);
}
};