summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-29 00:31:45 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-29 00:31:45 +0000
commitd2a9c07bd45ab0c97b49364faf80588ff5558f8f (patch)
treec796b8250999d408a4b30b21281d7da5baaf8be1
parent0bf908e49c957ce35ac194a0c9b739f22d76182e (diff)
Fixed an extremely n00bish mistake involving referencing a global copy of ServerEngine when we now use one local to class InspIRCd
(everyone point and laugh at Brain) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2692 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/command_parse.cpp2
-rw-r--r--src/commands.cpp1
-rw-r--r--src/dns.cpp9
-rw-r--r--src/dnsqueue.cpp4
-rw-r--r--src/inspircd.cpp2
5 files changed, 5 insertions, 13 deletions
diff --git a/src/command_parse.cpp b/src/command_parse.cpp
index 02db6258f..cd1faa885 100644
--- a/src/command_parse.cpp
+++ b/src/command_parse.cpp
@@ -78,8 +78,6 @@ extern int MODCOUNT;
extern InspSocket* socket_ref[65535];
extern time_t TIME;
-extern SocketEngine* SE;
-
// This table references users by file descriptor.
// its an array to make it VERY fast, as all lookups are referenced
// by an integer, meaning there is no need for a scan/search operation.
diff --git a/src/commands.cpp b/src/commands.cpp
index b3b9d41ac..599ccdb80 100644
--- a/src/commands.cpp
+++ b/src/commands.cpp
@@ -63,7 +63,6 @@ using namespace std;
#include "typedefs.h"
#include "command_parse.h"
-extern SocketEngine* SE;
extern ServerConfig* Config;
extern InspIRCd* ServerInstance;
diff --git a/src/dns.cpp b/src/dns.cpp
index efb690dc2..990c2170e 100644
--- a/src/dns.cpp
+++ b/src/dns.cpp
@@ -155,6 +155,9 @@ void dns_empty_header(unsigned char *output, const s_header *header, const int l
}
void dns_close(int fd) { /* close query */
+#ifndef THREADED_DNS
+ ServerInstance->SE->DelFd(fd);
+#endif
log(DEBUG,"DNS: dns_close on fd %d",fd);
if (fd == lastcreate) {
wantclose = 1;
@@ -717,9 +720,6 @@ std::string DNS::GetResult()
{
log(DEBUG,"DNS: GetResult()");
result = dns_getresult(this->myfd);
-#ifndef THREADED_DNS
- ServerInstance->SE->DelFd(this->myfd);
-#endif
if (result) {
ServerInstance->stats->statsDnsGood++;
dns_close(this->myfd);
@@ -741,9 +741,6 @@ std::string DNS::GetResultIP()
result = dns_getresult(this->myfd);
if (this->myfd != -1)
{
-#ifndef THREADED_DNS
- ServerInstance->SE->DelFd(this->myfd);
-#endif
dns_close(this->myfd);
}
if (result)
diff --git a/src/dnsqueue.cpp b/src/dnsqueue.cpp
index c0f516e74..74bcca34f 100644
--- a/src/dnsqueue.cpp
+++ b/src/dnsqueue.cpp
@@ -50,8 +50,8 @@ using namespace std;
#include "hashcomp.h"
#include "socketengine.h"
-extern SocketEngine* SE;
extern ServerConfig* Config;
+extern InspIRCd* ServerInstance;
class Lookup;
@@ -265,6 +265,6 @@ void dns_poll(int fdcheck)
* about it.
*/
if (SE)
- SE->DelFd(fdcheck);
+ ServerInstance->SE->DelFd(fdcheck);
}
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index 993348aff..6f1889bbf 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -80,8 +80,6 @@ extern InspSocket* socket_ref[65535];
time_t TIME = time(NULL), OLDTIME = time(NULL);
-SocketEngine* SE = NULL;
-
// This table references users by file descriptor.
// its an array to make it VERY fast, as all lookups are referenced
// by an integer, meaning there is no need for a scan/search operation.