From 3c5d62d3b3d7e3e3543b304b9aef6eb7aead0de1 Mon Sep 17 00:00:00 2001 From: brain Date: Tue, 8 Aug 2006 09:35:06 +0000 Subject: Add checking on AddFd that was missing (it assumed, like everything else) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4781 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/extra/m_pgsql.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/modules') diff --git a/src/modules/extra/m_pgsql.cpp b/src/modules/extra/m_pgsql.cpp index 24c5aa499..5d07c23b5 100644 --- a/src/modules/extra/m_pgsql.cpp +++ b/src/modules/extra/m_pgsql.cpp @@ -735,7 +735,12 @@ bool SQLConn::DoConnect() } this->state = I_CONNECTING; - ServerInstance->SE->AddFd(this->fd,false,X_ESTAB_MODULE); + if (!ServerInstance->SE->AddFd(this->fd,false,X_ESTAB_MODULE)) + { + log(DEBUG, "A PQsocket cant be added to the socket engine!"); + Close(); + return false; + } socket_ref[this->fd] = this; /* Socket all hooked into the engine, now to tell PgSQL to start connecting */ -- cgit v1.2.3