From ef95ef0d58ba833655cf08ae2201d487a96777fb Mon Sep 17 00:00:00 2001 From: Joe Shaw Date: Fri, 7 Mar 2003 23:02:26 +0000 Subject: [PATCH] Bump up to 1.99.13. 2003-03-07 Joe Shaw * configure.in: Bump up to 1.99.13. * libsoup/soup-context.c (soup_context_connect_cb): Add G_IO_IN to the list of conditions to watch. If the remote end hangs up the connection, we'll get a successful read of 0 bytes, not a HUP. The connection will have to be released by the point we check for it in connection_death(). * libsoup/soup-queue.c (soup_queue_error_cb): Get rid of some (apparently) errant resetting of the read and write tags. I think this might have been causing some reentrancy and crashes. * libsoup/soup-socket.c (soup_socket_get_iochannel): Set the IO channel to NULL encoding and not buffered. * libsoup/soup-transfer.c (soup_transfer_read_cb): Remove some incorrect comments. --- ChangeLog | 20 ++++++++++++++++++++ configure.in | 2 +- libsoup/soup-context.c | 2 +- libsoup/soup-queue.c | 3 --- libsoup/soup-socket.c | 5 ++++- libsoup/soup-transfer.c | 10 ---------- 6 files changed, 26 insertions(+), 16 deletions(-) diff --git a/ChangeLog b/ChangeLog index e8e518d..5539368 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,23 @@ +2003-03-07 Joe Shaw + + * configure.in: Bump up to 1.99.13. + + * libsoup/soup-context.c (soup_context_connect_cb): Add G_IO_IN to + the list of conditions to watch. If the remote end hangs up the + connection, we'll get a successful read of 0 bytes, not a HUP. + The connection will have to be released by the point we check for + it in connection_death(). + + * libsoup/soup-queue.c (soup_queue_error_cb): Get rid of some + (apparently) errant resetting of the read and write tags. I think + this might have been causing some reentrancy and crashes. + + * libsoup/soup-socket.c (soup_socket_get_iochannel): Set the IO + channel to NULL encoding and not buffered. + + * libsoup/soup-transfer.c (soup_transfer_read_cb): Remove some + incorrect comments. + 2003-02-28 Joe Shaw * configure.in: Bump up to 1.99.12. diff --git a/configure.in b/configure.in index 56ab42d..5b4d76a 100644 --- a/configure.in +++ b/configure.in @@ -4,7 +4,7 @@ dnl ******************************************* AC_INIT(libsoup/soup.h) -AM_INIT_AUTOMAKE(libsoup, 1.99.12) +AM_INIT_AUTOMAKE(libsoup, 1.99.13) AM_CONFIG_HEADER(config.h) AM_MAINTAINER_MODE AC_PROG_MAKE_SET diff --git a/libsoup/soup-context.c b/libsoup/soup-context.c index d834932..ab927c3 100644 --- a/libsoup/soup-context.c +++ b/libsoup/soup-context.c @@ -352,7 +352,7 @@ soup_context_connect_cb (SoupSocket *socket, chan = soup_connection_get_iochannel (new_conn); new_conn->death_tag = g_io_add_watch (chan, - G_IO_ERR | G_IO_HUP | G_IO_NVAL, + G_IO_IN | G_IO_ERR | G_IO_HUP | G_IO_NVAL, (GIOFunc) connection_death, new_conn); g_io_channel_unref (chan); diff --git a/libsoup/soup-queue.c b/libsoup/soup-queue.c index 88625aa..6d32703 100644 --- a/libsoup/soup-queue.c +++ b/libsoup/soup-queue.c @@ -61,9 +61,6 @@ soup_queue_error_cb (gboolean body_started, gpointer user_data) soup_connection_set_keep_alive (req->connection, FALSE); - req->priv->read_tag = 0; - req->priv->write_tag = 0; - switch (req->status) { case SOUP_STATUS_IDLE: case SOUP_STATUS_QUEUED: diff --git a/libsoup/soup-socket.c b/libsoup/soup-socket.c index c563756..7e07f75 100644 --- a/libsoup/soup-socket.c +++ b/libsoup/soup-socket.c @@ -271,8 +271,11 @@ soup_socket_get_iochannel (SoupSocket* socket) { g_return_val_if_fail (socket != NULL, NULL); - if (socket->iochannel == NULL) + if (socket->iochannel == NULL) { socket->iochannel = g_io_channel_unix_new (socket->sockfd); + g_io_channel_set_encoding (socket->iochannel, NULL, NULL); + g_io_channel_set_buffered (socket->iochannel, FALSE); + } g_io_channel_ref (socket->iochannel); diff --git a/libsoup/soup-transfer.c b/libsoup/soup-transfer.c index c5e9a81..77a7477 100644 --- a/libsoup/soup-transfer.c +++ b/libsoup/soup-transfer.c @@ -447,16 +447,6 @@ soup_transfer_read_cb (GIOChannel *iochannel, } PROCESS_READ: - /* - * FIXME: Why are we getting a read_cb if there is no data to read? Yet - * error_cb isn't being called and we get no error from - * g_io_channel_read(). - */ - /* - * Update, Joe, 2/28/2003: Looks like we'll get this after a SIGPIPE. - * Instead of erroring out and probably messing with freed data, - * cancel out. - */ if (r->header_len == 0 && total_read == 0) goto FINISH_READ; -- 2.7.4