cvs: php4 /ext/ircg ircg.c

From: Date: Sat, 28 Apr 2001 12:57:56 +0000
Subject: cvs: php4 /ext/ircg ircg.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-5344@lists.php.net to get a copy of this message
sas Sat Apr 28 05:57:56 2001 EDT Modified files: /php4/ext/ircg ircg.c Log: add some diagnostic output to phpinfo. Index: php4/ext/ircg/ircg.c diff -u php4/ext/ircg/ircg.c:1.65 php4/ext/ircg/ircg.c:1.66 --- php4/ext/ircg/ircg.c:1.65 Wed Apr 25 07:15:09 2001 +++ php4/ext/ircg/ircg.c Sat Apr 28 05:57:56 2001 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: ircg.c,v 1.65 2001/04/25 14:15:09 sas Exp $ */ +/* $Id: ircg.c,v 1.66 2001/04/28 12:57:56 sas Exp $ */ #include "php.h" #include "php_ini.h" @@ -37,6 +37,8 @@ static HashTable h_fmt_msgs; /* Integer IDs to php_fmt_msgs_t * */ static int irconn_id = 1; +static unsigned long irc_connects, irc_set_currents, irc_quit_handlers; + /* Format string numbers */ enum { FMT_MSG_CHAN = 0, @@ -187,6 +189,7 @@ { php_irconn_t *conn = dummy; + irc_quit_handlers++; if (conn->fd > -1) { zend_hash_index_del(&h_fd2irconn, conn->fd); irc_write_buf_del(&conn->wb); @@ -798,6 +801,7 @@ if (!conn) RETURN_FALSE; + irc_set_currents++; thttpd_register_on_close(http_closed_connection); thttpd_set_dont_close(); conn->fd = thttpd_get_fd(); @@ -1264,6 +1268,7 @@ free(conn); RETURN_FALSE; } + irc_connects++; if (p5 && Z_TYPE_PP(p5) == IS_ARRAY) { ircg_copy_ctcp_msgs(p5, conn); } @@ -1464,6 +1469,12 @@ php_info_print_table_row(2, "scanner result cache hits", buf); sprintf(buf, "%lu", cache_misses); php_info_print_table_row(2, "scanner result cache misses", buf); + sprintf(buf, "%lu", irc_connects); + php_info_print_table_row(2, "irc_connects", buf); + sprintf(buf, "%lu", irc_set_currents); + php_info_print_table_row(2, "irc_set_currents", buf); + sprintf(buf, "%lu", irc_quit_handlers); + php_info_print_table_row(2, "irc_quit_handlers", buf); php_info_print_table_end(); }

« previous php.cvs (#5344) next »