cvs: pear /PECL/session_pgsql session_pgsql.c

From: Date: Tue, 14 Jan 2003 20:34:49 +0000
Subject: cvs: pear /PECL/session_pgsql session_pgsql.c
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-8241@lists.php.net to get a copy of this message
yohgaki Tue Jan 14 15:34:49 2003 EDT Modified files: /pear/PECL/session_pgsql session_pgsql.c Log: Move GC to session close. Removed unneeded define. (Last commit comment - comment was missing Reorganize source. Fixed memory corruption due to too early shutdown function call) Index: pear/PECL/session_pgsql/session_pgsql.c diff -u pear/PECL/session_pgsql/session_pgsql.c:1.29 pear/PECL/session_pgsql/session_pgsql.c:1.30 --- pear/PECL/session_pgsql/session_pgsql.c:1.29 Tue Jan 14 05:46:35 2003 +++ pear/PECL/session_pgsql/session_pgsql.c Tue Jan 14 15:34:49 2003 @@ -6,7 +6,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: session_pgsql.c,v 1.29 2003/01/14 10:46:35 yohgaki Exp $ */ +/* $Id: session_pgsql.c,v 1.30 2003/01/14 20:34:49 yohgaki Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -63,7 +63,7 @@ static int ps_pgsql_app_write(TSRMLS_D); static int ps_pgsql_sess_read(const char *key, char **val, int *vallen TSRMLS_DC); static int ps_pgsql_sess_write(const char *key, const char *val, const int vallen TSRMLS_DC); -static int ps_pgsql_gc(TSRMLS_D); +static int ps_pgsql_sess_gc(TSRMLS_D); #define PS_PGSQL_DATA ps_pgsql *data = PS_GET_MOD_DATA() #define QUERY_BUF_SIZE 256 @@ -307,7 +307,7 @@ if (PS_PGSQL(disable)) { return SUCCESS; } - return ps_pgsql_gc(TSRMLS_C); + return SUCCESS; } /* }}} */ @@ -824,9 +824,9 @@ } /* }}} */ -/* {{{ pg_pgsql_gc +/* {{{ pg_pgsql_sess_gc */ -static int ps_pgsql_gc(TSRMLS_D) +static int ps_pgsql_sess_gc(TSRMLS_D) { PGresult *pg_result; char query[QUERY_BUF_SIZE+1]; @@ -881,6 +881,8 @@ ELOG("CLOSE Called"); *mod_data = (void *)0; /* mod_data should be set to NULL to avoid additional close call */ + /* GC is done here for better response when GC is performed */ + ps_pgsql_sess_gc(TSRMLS_C); return SUCCESS; } /* }}} */ @@ -904,8 +906,6 @@ return ret; } /* }}} */ - -#define PS_PGSQL_CHECK_APP_MODIFIED() 1 /* {{{ PS_WRITE_FUNC */

« previous php.pear.cvs (#8241) next »