+2003-03-07 Joe Shaw <joe@ximian.com>
+
+ * 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 <joe@ximian.com>
* configure.in: Bump up to 1.99.12.
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
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);
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:
{
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);
}
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;