diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-12-02 09:41:39 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-12-02 09:41:39 +0000 |
commit | 001e00ba23962648cf0f8bfa1e1c50685ba6a15d (patch) | |
tree | b11fa12443541ccb218871e42863b7628af59e81 /src/inspircd.cpp | |
parent | 270f1f8d19779a20231a4228286da5e5bf8b2be9 (diff) |
Made threading optional
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2108 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/inspircd.cpp')
-rw-r--r-- | src/inspircd.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 65b43fa37..271332f70 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -51,7 +51,9 @@ using namespace std; #include <vector> #include <deque> #include <sched.h> +#ifdef THREADED_DNS #include <pthread.h> +#endif #include "users.h" #include "ctables.h" #include "globals.h" @@ -1330,6 +1332,7 @@ void AddWhoWas(userrec* u) } } +#ifdef THREADED_DNS void* dns_task(void* arg) { userrec* u = (userrec*)arg; @@ -1372,6 +1375,7 @@ void* dns_task(void* arg) u->dns_done = true; return NULL; } +#endif /* add a client connection to the sockets list */ void AddClient(int socket, char* host, int port, bool iscached, char* ip) @@ -1610,7 +1614,12 @@ std::string GetVersionString() v2 = strtok_r(s1," ",&savept); s1 = savept; char socketengine[] = engine_name; - snprintf(versiondata,MAXBUF,"%s Rev. %s %s :%s (O=%lu) [SE=%s]",VERSION,v2,ServerName,SYSTEM,(unsigned long)OPTIMISATION,socketengine); +#ifdef THREADED_DNS + char dnsengine[] = "multithread"; +#else + char dnsengine[] = "singlethread"; +#endif + snprintf(versiondata,MAXBUF,"%s Rev. %s %s :%s [FLAGS=%lu,%s,%s]",VERSION,v2,ServerName,SYSTEM,(unsigned long)OPTIMISATION,socketengine,dnsengine); return versiondata; } |