diff options
-rw-r--r-- | include/socket.h | 1 | ||||
-rw-r--r-- | src/inspircd.cpp | 6 |
2 files changed, 4 insertions, 3 deletions
diff --git a/include/socket.h b/include/socket.h index fd5e26586..9982ee7ba 100644 --- a/include/socket.h +++ b/include/socket.h @@ -17,6 +17,7 @@ #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> +#include <poll.h> #include <sstream> #include <string> diff --git a/src/inspircd.cpp b/src/inspircd.cpp index c305fea92..04777ae19 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -2706,7 +2706,6 @@ int InspIRCd(char** argv, int argc) WritePID(PID); length = sizeof (client); - char tcp_msg[MAXBUF],tcp_host[MAXBUF],tcp_sum[MAXBUF]; engine_structs; timeval tvs; tvs.tv_usec = 10000L; @@ -2740,9 +2739,10 @@ int InspIRCd(char** argv, int argc) for (std::vector<InspSocket*>::iterator a = module_sockets.begin(); a < module_sockets.end(); a++) { - if (!a->Poll()) + InspSocket* s = (InspSocket*)*a; + if (!s->Poll()) { - delete *a; + delete s; module_sockets.erase(a); break; } |