diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-08 09:35:06 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-08 09:35:06 +0000 |
commit | 3c5d62d3b3d7e3e3543b304b9aef6eb7aead0de1 (patch) | |
tree | 0a582c0c29792d27a1dbd758d0ff9688e107c10f | |
parent | 2329d59b09cdc05b0b403f7d313df65492e1813b (diff) |
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
-rw-r--r-- | src/modules/extra/m_pgsql.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
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 */ |