summaryrefslogtreecommitdiff
path: root/src/modules/extra
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-18 01:08:14 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-18 01:08:14 +0000
commite381b06561228aaea752deda20a62c6dc99a560e (patch)
tree2119fe8bc8895597261935f389004e3c6bafe6a8 /src/modules/extra
parent3c82d2d767186dd6d386dbbe08219ad8612e299e (diff)
EventHandler class, an abstraction for raw i/o
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4941 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/extra')
-rw-r--r--src/modules/extra/m_pgsql.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/modules/extra/m_pgsql.cpp b/src/modules/extra/m_pgsql.cpp
index 0a8c1fd11..1790fdfef 100644
--- a/src/modules/extra/m_pgsql.cpp
+++ b/src/modules/extra/m_pgsql.cpp
@@ -738,13 +738,12 @@ bool SQLConn::DoConnect()
}
this->state = I_CONNECTING;
- if (!this->Instance->SE->AddFd(this->fd,false,X_ESTAB_MODULE))
+ if (!this->Instance->SE->AddFd(this))
{
Instance->Log(DEBUG, "A PQsocket cant be added to the socket engine!");
Close();
return false;
}
- this->Instance->socket_ref[this->fd] = this;
/* Socket all hooked into the engine, now to tell PgSQL to start connecting */
@@ -754,9 +753,7 @@ bool SQLConn::DoConnect()
void SQLConn::Close()
{
Instance->Log(DEBUG,"SQLConn::Close");
-
- if(this->fd > 01)
- Instance->socket_ref[this->fd] = NULL;
+
this->fd = -1;
this->state = I_ERROR;
this->OnError(I_ERR_SOCKET);