sas Thu Dec 12 19:33:30 2002 EDT
Modified files:
/php4/ext/ircg ircg.c php_ircg.h
Log:
make IRCG startup behaviour configurable (work dir, shared mem size,
control user)
Index: php4/ext/ircg/ircg.c
diff -u php4/ext/ircg/ircg.c:1.160 php4/ext/ircg/ircg.c:1.161
--- php4/ext/ircg/ircg.c:1.160 Tue Dec 10 13:30:45 2002
+++ php4/ext/ircg/ircg.c Thu Dec 12 19:33:29 2002
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: ircg.c,v 1.160 2002/12/10 18:30:45 sas Exp $ */
+/* $Id: ircg.c,v 1.161 2002/12/13 00:33:29 sas Exp $ */
/* {{{ includes */
@@ -213,6 +213,12 @@
ZEND_DECLARE_MODULE_GLOBALS(ircg)
+PHP_INI_BEGIN()
+ STD_PHP_INI_ENTRY("ircg.work_dir", "/tmp/ircg", PHP_INI_ALL, OnUpdateString,
+work_dir, zend_ircg_globals, ircg_globals)
+ STD_PHP_INI_ENTRY("ircg.shared_mem_size", "10000000", PHP_INI_ALL,
+OnUpdateInt, shared_mem_size, zend_ircg_globals, ircg_globals)
+ STD_PHP_INI_ENTRY("ircg.control_user", "nobody", PHP_INI_ALL, OnUpdateString,
+control_user, zend_ircg_globals, ircg_globals)
+PHP_INI_END()
+
/* }}} */
/* {{{ Format-message accessor macros */
@@ -2132,11 +2138,12 @@
}
#endif
+ REGISTER_INI_ENTRIES();
if (initialized == 0) {
initialized = 1;
#if IRCG_API_VERSION >= 20021127
- ircg_setup_global("/tmp/ircg", 10000000, setup);
+ ircg_setup_global(IRCGG(work_dir), IRCGG(shared_mem_size),
+IRCGG(control_user), IRCGG(setup));
#else
setup(0);
setup(1);
@@ -2216,6 +2223,8 @@
#endif
php_info_print_table_end();
+
+ DISPLAY_INI_ENTRIES();
}
/* }}} */
Index: php4/ext/ircg/php_ircg.h
diff -u php4/ext/ircg/php_ircg.h:1.24 php4/ext/ircg/php_ircg.h:1.25
--- php4/ext/ircg/php_ircg.h:1.24 Tue Dec 3 05:13:36 2002
+++ php4/ext/ircg/php_ircg.h Thu Dec 12 19:33:30 2002
@@ -65,6 +65,9 @@
ZEND_BEGIN_MODULE_GLOBALS(ircg)
void *flush_data;
+ char *control_user;
+ long shared_mem_size;
+ char *work_dir;
ZEND_END_MODULE_GLOBALS(ircg)
#ifdef ZTS
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php