summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2014-02-08 13:16:31 +0100
committerAttila Molnar <attilamolnar@hush.com>2014-02-08 13:16:31 +0100
commited6176383eef5de23a62c7de70b58b8d80239005 (patch)
tree4cfa896cd77dac654163cd765eb5c7cd1c8f560c
parent2cf4b614e6c23bfc6d47da2ec4b1932ee2f62cf0 (diff)
Replace SocketEngine::GetName() with INSPIRCD_SOCKETENGINE_NAME define
-rwxr-xr-xconfigure1
-rw-r--r--include/socketengine.h6
-rw-r--r--src/modules/m_httpd_stats.cpp2
-rw-r--r--src/server.cpp2
-rw-r--r--src/socketengines/socketengine_epoll.cpp6
-rw-r--r--src/socketengines/socketengine_kqueue.cpp6
-rw-r--r--src/socketengines/socketengine_poll.cpp6
-rw-r--r--src/socketengines/socketengine_ports.cpp6
-rw-r--r--src/socketengines/socketengine_select.cpp6
-rw-r--r--win/config.h.cmake1
10 files changed, 4 insertions, 38 deletions
diff --git a/configure b/configure
index 2f92d9f16..4db9064b9 100755
--- a/configure
+++ b/configure
@@ -455,6 +455,7 @@ sub writefiles {
#define VERSION "$version"
#define REVISION "$revision"
#define SYSTEM "$incos"
+#define INSPIRCD_SOCKETENGINE_NAME "$config{SOCKETENGINE}"
#define CONFIG_PATH "$config{CONFIG_DIR}"
#define DATA_PATH "$config{DATA_DIR}"
diff --git a/include/socketengine.h b/include/socketengine.h
index b57113af0..a2179d951 100644
--- a/include/socketengine.h
+++ b/include/socketengine.h
@@ -358,12 +358,6 @@ public:
*/
virtual void DispatchTrialWrites();
- /** Returns the socket engines name. This returns the name of the
- * engine for use in /VERSION responses.
- * @return The socket engine name
- */
- virtual std::string GetName() = 0;
-
/** Returns true if the file descriptors in the given event handler are
* within sensible ranges which can be handled by the socket engine.
*/
diff --git a/src/modules/m_httpd_stats.cpp b/src/modules/m_httpd_stats.cpp
index 11809e893..e94ee2504 100644
--- a/src/modules/m_httpd_stats.cpp
+++ b/src/modules/m_httpd_stats.cpp
@@ -107,7 +107,7 @@ class ModuleHttpStats : public Module
data << "<usercount>" << ServerInstance->Users->clientlist->size() << "</usercount>";
data << "<channelcount>" << ServerInstance->chanlist->size() << "</channelcount>";
data << "<opercount>" << ServerInstance->Users->all_opers.size() << "</opercount>";
- data << "<socketcount>" << (ServerInstance->SE->GetUsedFds()) << "</socketcount><socketmax>" << ServerInstance->SE->GetMaxFds() << "</socketmax><socketengine>" << ServerInstance->SE->GetName() << "</socketengine>";
+ data << "<socketcount>" << (ServerInstance->SE->GetUsedFds()) << "</socketcount><socketmax>" << ServerInstance->SE->GetMaxFds() << "</socketmax><socketengine>" INSPIRCD_SOCKETENGINE_NAME "</socketengine>";
time_t current_time = 0;
current_time = ServerInstance->Time();
diff --git a/src/server.cpp b/src/server.cpp
index 1d1f52641..5590f05f9 100644
--- a/src/server.cpp
+++ b/src/server.cpp
@@ -68,7 +68,7 @@ void InspIRCd::Rehash(const std::string& uuid)
std::string InspIRCd::GetVersionString(bool getFullVersion)
{
if (getFullVersion)
- return VERSION " " + Config->ServerName + " :" SYSTEM " [" REVISION "," + SE->GetName() + "," + Config->sid + "]";
+ return VERSION " " + Config->ServerName + " :" SYSTEM " [" REVISION "," INSPIRCD_SOCKETENGINE_NAME "," + Config->sid + "]";
return BRANCH " " + Config->ServerName + " :" + Config->CustomVersion;
}
diff --git a/src/socketengines/socketengine_epoll.cpp b/src/socketengines/socketengine_epoll.cpp
index 09fa918c6..800cc7657 100644
--- a/src/socketengines/socketengine_epoll.cpp
+++ b/src/socketengines/socketengine_epoll.cpp
@@ -49,7 +49,6 @@ public:
virtual void OnSetEvent(EventHandler* eh, int old_mask, int new_mask);
virtual void DelFd(EventHandler* eh);
virtual int DispatchEvents();
- virtual std::string GetName();
};
EPollEngine::EPollEngine() : events(1)
@@ -255,11 +254,6 @@ int EPollEngine::DispatchEvents()
return i;
}
-std::string EPollEngine::GetName()
-{
- return "epoll";
-}
-
SocketEngine* CreateSocketEngine()
{
return new EPollEngine;
diff --git a/src/socketengines/socketengine_kqueue.cpp b/src/socketengines/socketengine_kqueue.cpp
index 07ea19d9d..53bd741f0 100644
--- a/src/socketengines/socketengine_kqueue.cpp
+++ b/src/socketengines/socketengine_kqueue.cpp
@@ -51,7 +51,6 @@ public:
void OnSetEvent(EventHandler* eh, int old_mask, int new_mask);
virtual void DelFd(EventHandler* eh);
virtual int DispatchEvents();
- virtual std::string GetName();
virtual void RecoverFromFork();
};
@@ -255,11 +254,6 @@ int KQueueEngine::DispatchEvents()
return i;
}
-std::string KQueueEngine::GetName()
-{
- return "kqueue";
-}
-
SocketEngine* CreateSocketEngine()
{
return new KQueueEngine;
diff --git a/src/socketengines/socketengine_poll.cpp b/src/socketengines/socketengine_poll.cpp
index 2919988c0..53953626f 100644
--- a/src/socketengines/socketengine_poll.cpp
+++ b/src/socketengines/socketengine_poll.cpp
@@ -60,7 +60,6 @@ public:
virtual void OnSetEvent(EventHandler* eh, int old_mask, int new_mask);
virtual void DelFd(EventHandler* eh);
virtual int DispatchEvents();
- virtual std::string GetName();
};
PollEngine::PollEngine() : events(1), fd_mappings(1)
@@ -246,11 +245,6 @@ int PollEngine::DispatchEvents()
return i;
}
-std::string PollEngine::GetName()
-{
- return "poll";
-}
-
SocketEngine* CreateSocketEngine()
{
return new PollEngine;
diff --git a/src/socketengines/socketengine_ports.cpp b/src/socketengines/socketengine_ports.cpp
index 098e75116..74c36712b 100644
--- a/src/socketengines/socketengine_ports.cpp
+++ b/src/socketengines/socketengine_ports.cpp
@@ -54,7 +54,6 @@ public:
virtual void OnSetEvent(EventHandler* eh, int old_mask, int new_mask);
virtual void DelFd(EventHandler* eh);
virtual int DispatchEvents();
- virtual std::string GetName();
};
PortsEngine::PortsEngine() : events(1)
@@ -194,11 +193,6 @@ int PortsEngine::DispatchEvents()
return (int)i;
}
-std::string PortsEngine::GetName()
-{
- return "ports";
-}
-
SocketEngine* CreateSocketEngine()
{
return new PortsEngine;
diff --git a/src/socketengines/socketengine_select.cpp b/src/socketengines/socketengine_select.cpp
index 82fe0bb6b..e9d7a9660 100644
--- a/src/socketengines/socketengine_select.cpp
+++ b/src/socketengines/socketengine_select.cpp
@@ -41,7 +41,6 @@ public:
virtual void DelFd(EventHandler* eh);
void OnSetEvent(EventHandler* eh, int, int);
virtual int DispatchEvents();
- virtual std::string GetName();
};
SelectEngine::SelectEngine()
@@ -173,11 +172,6 @@ int SelectEngine::DispatchEvents()
return sresult;
}
-std::string SelectEngine::GetName()
-{
- return "select";
-}
-
SocketEngine* CreateSocketEngine()
{
return new SelectEngine;
diff --git a/win/config.h.cmake b/win/config.h.cmake
index 081163fab..3a34a706b 100644
--- a/win/config.h.cmake
+++ b/win/config.h.cmake
@@ -4,6 +4,7 @@
#define VERSION "@FULL_VERSION@"
#define REVISION "release"
#define SYSTEM "@CMAKE_SYSTEM@"
+#define INSPIRCD_SOCKETENGINE_NAME "select"
#define CONFIG_PATH "@CONF_PATH@"
#define MOD_PATH "@MODULE_PATH@"