cvs: php4 /ext/ircg ircg.c

From: Date: Tue, 29 Apr 2003 09:58:32 +0000
Subject: cvs: php4 /ext/ircg ircg.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-20578@lists.php.net to get a copy of this message
sas Tue Apr 29 05:58:32 2003 EDT Modified files: /php4/ext/ircg ircg.c Log: align ircg_disconnect with new system Index: php4/ext/ircg/ircg.c diff -u php4/ext/ircg/ircg.c:1.185 php4/ext/ircg/ircg.c:1.186 --- php4/ext/ircg/ircg.c:1.185 Tue Apr 29 04:54:29 2003 +++ php4/ext/ircg/ircg.c Tue Apr 29 05:58:31 2003 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: ircg.c,v 1.185 2003/04/29 08:54:29 sas Exp $ */ +/* $Id: ircg.c,v 1.186 2003/04/29 09:58:31 sas Exp $ */ /* {{{ includes */ @@ -2051,6 +2051,7 @@ PHP_FUNCTION(ircg_disconnect) { zval **id, **reason; + php_irconn_t *conn; if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &id, &reason) == FAILURE) WRONG_PARAM_COUNT; @@ -2060,6 +2061,14 @@ #ifdef USE_IRCONN_MANAGEMENT ircg_hash_index_del(&h_irconn, Z_LVAL_PP(id)); +#else + conn = lookup_irconn(Z_LVAL_PP(id)); + + if (!conn) RETURN_FALSE; + + irc_disconnect(&conn->conn, Z_STRVAL_PP(reason)); + + put_irconn(conn); #endif RETURN_TRUE;

« previous php.cvs (#20578) next »