diff options
author | Dan Winship <danw@gnome.org> | 2009-08-21 18:42:55 -0400 |
---|---|---|
committer | Dan Winship <danw@gnome.org> | 2009-08-21 18:42:55 -0400 |
commit | 8e7972844567e5385bbd02c2e534b451a3cc1da6 (patch) | |
tree | 6712e730dcfd4f0461f41b1a574808c88f65f44b | |
parent | 53095c541d677d0b6f96fc9becca1c1329c37975 (diff) | |
download | libsoup-8e7972844567e5385bbd02c2e534b451a3cc1da6.tar.gz |
Remove checks for SOUP_MESSAGE_IO_STATUS_CONNECTING, since it never gets set
The connection-management rewrite removed the code that would set it.
Since it never worked exactly the way it was supposed to anyway, let's
just get rid of it and replace it with something better.
-rw-r--r-- | libsoup/soup-message-private.h | 3 | ||||
-rw-r--r-- | libsoup/soup-session-async.c | 9 |
2 files changed, 2 insertions, 10 deletions
diff --git a/libsoup/soup-message-private.h b/libsoup/soup-message-private.h index 765ee3c1..7375bd16 100644 --- a/libsoup/soup-message-private.h +++ b/libsoup/soup-message-private.h @@ -14,7 +14,6 @@ typedef enum { SOUP_MESSAGE_IO_STATUS_IDLE, SOUP_MESSAGE_IO_STATUS_QUEUED, - SOUP_MESSAGE_IO_STATUS_CONNECTING, SOUP_MESSAGE_IO_STATUS_RUNNING, SOUP_MESSAGE_IO_STATUS_FINISHED } SoupMessageIOStatus; @@ -44,7 +43,7 @@ typedef struct { } SoupMessagePrivate; #define SOUP_MESSAGE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), SOUP_TYPE_MESSAGE, SoupMessagePrivate)) -#define SOUP_MESSAGE_IS_STARTING(msg) (SOUP_MESSAGE_GET_PRIVATE (msg)->io_status == SOUP_MESSAGE_IO_STATUS_QUEUED || SOUP_MESSAGE_GET_PRIVATE (msg)->io_status == SOUP_MESSAGE_IO_STATUS_CONNECTING) +#define SOUP_MESSAGE_IS_STARTING(msg) (SOUP_MESSAGE_GET_PRIVATE (msg)->io_status == SOUP_MESSAGE_IO_STATUS_QUEUED) void soup_message_cleanup_response (SoupMessage *req); diff --git a/libsoup/soup-session-async.c b/libsoup/soup-session-async.c index cdb9961b..9d0ef713 100644 --- a/libsoup/soup-session-async.c +++ b/libsoup/soup-session-async.c @@ -303,7 +303,6 @@ run_queue (SoupSessionAsync *sa) SoupMessageQueueItem *item; SoupProxyURIResolver *proxy_resolver; SoupMessage *msg; - SoupMessageIOStatus cur_io_status = SOUP_MESSAGE_IO_STATUS_CONNECTING; SoupConnection *conn; gboolean try_pruning = TRUE, should_prune = FALSE; @@ -319,8 +318,7 @@ run_queue (SoupSessionAsync *sa) if (msg->method == SOUP_METHOD_CONNECT) continue; - if (soup_message_get_io_status (msg) != cur_io_status || - soup_message_io_in_progress (msg)) + if (soup_message_io_in_progress (msg)) continue; if (!item->resolved_proxy_addr) { @@ -346,11 +344,6 @@ run_queue (SoupSessionAsync *sa) if (item) soup_message_queue_item_unref (item); - if (cur_io_status == SOUP_MESSAGE_IO_STATUS_CONNECTING) { - cur_io_status = SOUP_MESSAGE_IO_STATUS_QUEUED; - goto try_again; - } - if (try_pruning && should_prune) { /* There is at least one message in the queue that * could be sent if we pruned an idle connection from |