summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/core/ns_set.cpp4
-rw-r--r--src/socketengines/socketengine_epoll.cpp8
-rw-r--r--src/socketengines/socketengine_poll.cpp8
-rw-r--r--src/socketengines/socketengine_select.cpp8
4 files changed, 20 insertions, 8 deletions
diff --git a/modules/core/ns_set.cpp b/modules/core/ns_set.cpp
index 47b70c365..ed234e4ba 100644
--- a/modules/core/ns_set.cpp
+++ b/modules/core/ns_set.cpp
@@ -125,7 +125,7 @@ class CommandNSSet : public Command
class CommandNSSetDisplay : public Command
{
public:
- CommandNSSetDisplay() : Command("DISPLAY", 1)
+ CommandNSSetDisplay() : Command("DISPLAY", 2)
{
this->SetDesc(_("Set the display of your group in Services"));
}
@@ -165,7 +165,7 @@ class CommandNSSetDisplay : public Command
class CommandNSSetPassword : public Command
{
public:
- CommandNSSetPassword() : Command("PASSWORD", 1)
+ CommandNSSetPassword() : Command("PASSWORD", 2)
{
this->SetDesc(_("Set your nickname password"));
}
diff --git a/src/socketengines/socketengine_epoll.cpp b/src/socketengines/socketengine_epoll.cpp
index 316696f54..ad9bef3ce 100644
--- a/src/socketengines/socketengine_epoll.cpp
+++ b/src/socketengines/socketengine_epoll.cpp
@@ -32,8 +32,12 @@ void SocketEngine::Shutdown()
{
Process();
- for (std::map<int, Socket *>::const_iterator it = Sockets.begin(), it_end = Sockets.end(); it != it_end; ++it)
- delete it->second;
+ for (std::map<int, Socket *>::const_iterator it = Sockets.begin(), it_end = Sockets.end(); it != it_end;)
+ {
+ Socket *s = it->second;
+ ++it;
+ delete s;
+ }
Sockets.clear();
delete [] events;
diff --git a/src/socketengines/socketengine_poll.cpp b/src/socketengines/socketengine_poll.cpp
index 3202bbe29..773a89839 100644
--- a/src/socketengines/socketengine_poll.cpp
+++ b/src/socketengines/socketengine_poll.cpp
@@ -39,8 +39,12 @@ void SocketEngine::Shutdown()
{
Process();
- for (std::map<int, Socket *>::const_iterator it = Sockets.begin(), it_end = Sockets.end(); it != it_end; ++it)
- delete it->second;
+ for (std::map<int, Socket *>::const_iterator it = Sockets.begin(), it_end = Sockets.end(); it != it_end;)
+ {
+ Socket *s = it->second;
+ ++it;
+ delete s;
+ }
Sockets.clear();
delete [] events;
diff --git a/src/socketengines/socketengine_select.cpp b/src/socketengines/socketengine_select.cpp
index e23046b79..99a0fefe1 100644
--- a/src/socketengines/socketengine_select.cpp
+++ b/src/socketengines/socketengine_select.cpp
@@ -15,8 +15,12 @@ void SocketEngine::Shutdown()
{
Process();
- for (std::map<int, Socket *>::const_iterator it = Sockets.begin(), it_end = Sockets.end(); it != it_end; ++it)
- delete it->second;
+ for (std::map<int, Socket *>::const_iterator it = Sockets.begin(), it_end = Sockets.end(); it != it_end;)
+ {
+ Socket *s = it->second;
+ ++it;
+ delete s;
+ }
Sockets.clear();
MaxFD = 0;