cvs: php4 /ext/ircg ircg.c
| From: | Sascha Schumann | Date: | Sun, 01 Dec 2002 04:07:31 +0000 |
| Subject: | cvs: php4 /ext/ircg ircg.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-16788@lists.php.net to get a copy of this message | ||
sas Sat Nov 30 23:07:31 2002 EDT
Modified files:
/php4/ext/ircg ircg.c
Log:
flush write buffer in idle handler
add missing condition before deleting write buffer
Index: php4/ext/ircg/ircg.c
diff -u php4/ext/ircg/ircg.c:1.145 php4/ext/ircg/ircg.c:1.146
--- php4/ext/ircg/ircg.c:1.145 Sat Nov 30 22:59:48 2002
+++ php4/ext/ircg/ircg.c Sat Nov 30 23:07:30 2002
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: ircg.c,v 1.145 2002/12/01 03:59:48 sas Exp $ */
+/* $Id: ircg.c,v 1.146 2002/12/01 04:07:30 sas Exp $ */
/* {{{ includes */
@@ -442,7 +442,7 @@
if (is_my_conn(conn))
shutdown(conn->fd, 2);
#endif
- if (conn->file_fd == -1)
+ if (conn->file_fd == -1 && conn->fd >= 0)
irc_write_buf_del(&conn->wb);
}
if (conn->file_fd != -1) {
@@ -894,7 +894,7 @@
static void msg_send(php_irconn_t *conn, smart_str *msg)
{
msg_accum_send(conn, msg);
- if (conn->fd != -1 && conn->file_fd == -1)
+ if (conn->fd != -1 && conn->file_fd >= 0)
irc_write_buf_flush(&conn->wb);
}
@@ -1382,6 +1382,7 @@
smart_str_setl(&tmp, " ", 2);
irc_write_buf_append_ex(&conn->wb, &tmp, 1);
+ irc_write_buf_flush(&conn->wb);
} else if (conn->file_fd < 0
&& (php_ircg_now() - conn->login) > WINDOW_TIMEOUT) {
char buf[1024];