+ /* Create a socket on a random port. Let the tcp stack allocate us an available port */
+#ifdef IPV6
+ listener = new MsSQLListener(this, ServerInstance, 0, "::1");
+#else
+ listener = new MsSQLListener(this, ServerInstance, 0, "127.0.0.1");
+#endif
+
+ if (listener->GetFd() == -1)
+ {
+ ServerInstance->Modules->DoneWithInterface("SQLutils");
+ throw ModuleException("m_mssql: unable to create ITC pipe");
+ }
+ else
+ {
+ LoggingMutex->Lock();
+ ServerInstance->Logs->Log("m_mssql", DEBUG, "MsSQL: Interthread comms port is %d", listener->GetPort());
+ LoggingMutex->Unlock();
+ }