Remove checks for SOUP_MESSAGE_IO_STATUS_CONNECTING, since it never gets set
authorDan Winship <danw@gnome.org>
Fri, 21 Aug 2009 22:42:55 +0000 (18:42 -0400)
committerDan Winship <danw@gnome.org>
Fri, 21 Aug 2009 22:42:55 +0000 (18:42 -0400)
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.

libsoup/soup-message-private.h
libsoup/soup-session-async.c

index 765ee3c..7375bd1 100644 (file)
@@ -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);
 
index cdb9961..9d0ef71 100644 (file)
@@ -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