From e381b06561228aaea752deda20a62c6dc99a560e Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 18 Aug 2006 01:08:14 +0000 Subject: EventHandler class, an abstraction for raw i/o git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4941 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/extra/m_pgsql.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/modules/extra') 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); -- cgit v1.2.3