summaryrefslogtreecommitdiff
path: root/src/inspircd.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-01 21:35:07 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-01 21:35:07 +0000
commita5c9214743e76bd8bee1cb5f4d0d6dc3d1171c58 (patch)
tree2a520b22f9a7423924b4ad776b747fd9ba198ae9 /src/inspircd.cpp
parentcf2836550f864e162923b8db82d1758b7fb77175 (diff)
Removed threaded dns (it might make a comeback some day, but as it stands its incompatible with the new OO resolver)
Migrated to new OO resolver, removed as much firedns craq as is safe to do so, operates over one file descriptor now and keyed against request id. The only way to use the system is via class Resolver (so i'll need to migrate the rest of the ircd to use it) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4622 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/inspircd.cpp')
-rw-r--r--src/inspircd.cpp26
1 files changed, 3 insertions, 23 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index 57c23b328..a72ee2534 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -45,9 +45,6 @@
#include <fstream>
#include <vector>
#include <deque>
-#ifdef THREADED_DNS
-#include <pthread.h>
-#endif
#include "users.h"
#include "ctables.h"
#include "globals.h"
@@ -238,7 +235,6 @@ InspIRCd::InspIRCd(int argc, char** argv)
{
this->Start();
module_sockets.clear();
- init_dns();
this->startup_time = time(NULL);
srand(time(NULL));
log(DEBUG,"*** InspIRCd starting up!");
@@ -336,11 +332,7 @@ InspIRCd::InspIRCd(int argc, char** argv)
std::string InspIRCd::GetVersionString()
{
char versiondata[MAXBUF];
-#ifdef THREADED_DNS
- char dnsengine[] = "multithread";
-#else
- char dnsengine[] = "singlethread";
-#endif
+ char dnsengine[] = "singlethread-object";
if (*Config->CustomVersion)
{
snprintf(versiondata,MAXBUF,"%s %s :%s",VERSION,Config->ServerName,Config->CustomVersion);
@@ -825,20 +817,6 @@ void InspIRCd::DoOneIteration(bool process_module_sockets)
break;
case X_ESTAB_DNS:
- /* When we are using single-threaded dns,
- * the sockets for dns end up in our mainloop.
- * When we are using multi-threaded dns,
- * each thread has its own basic poll() loop
- * within it, making them 'fire and forget'
- * and independent of the mainloop.
- */
-#ifndef THREADED_DNS
- log(DEBUG,"Type: X_ESTAB_DNS: fd=%d",activefds[activefd]);
- dns_poll(activefds[activefd]);
-#endif
- break;
-
- case X_ESTAB_CLASSDNS:
/* Handles instances of the Resolver class,
* a simple class extended by modules for
* nonblocking resolving of addresses.
@@ -918,6 +896,8 @@ int InspIRCd::Run()
{
/* Until THIS point, ServerInstance == NULL */
+ init_dns();
+
LoadAllModules(this);
/* Just in case no modules were loaded - fix for bug #101 */