diff options
author | Dan Winship <danw@gnome.org> | 2012-05-27 11:30:03 -0400 |
---|---|---|
committer | Dan Winship <danw@gnome.org> | 2012-07-16 12:08:19 -0400 |
commit | d167a72774417278e1175f532aa83059c28c8b0c (patch) | |
tree | ff39a22a6149dcc9e1de6d4adbbe94a2c81ea583 /libsoup/soup-session-sync.c | |
parent | acc39b2e08cc8f8f729fd111c686168b4788a4c3 (diff) | |
download | libsoup-d167a72774417278e1175f532aa83059c28c8b0c.tar.gz |
SoupSession: replace queue_message() base impl with a separate method
Create soup_session_append_queue_item() to do what the base
implementation of queue_message() did, and use that from various
places that used to call the base queue_message() directly.
Diffstat (limited to 'libsoup/soup-session-sync.c')
-rw-r--r-- | libsoup/soup-session-sync.c | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/libsoup/soup-session-sync.c b/libsoup/soup-session-sync.c index 12841764..b86a6ca5 100644 --- a/libsoup/soup-session-sync.c +++ b/libsoup/soup-session-sync.c @@ -328,12 +328,8 @@ soup_session_sync_queue_message (SoupSession *session, SoupMessage *msg, SoupMessageQueueItem *item; GThread *thread; - SOUP_SESSION_CLASS (soup_session_sync_parent_class)-> - queue_message (g_object_ref (session), msg, callback, user_data); - - item = soup_message_queue_lookup (soup_session_get_queue (session), msg); - g_return_if_fail (item != NULL); - + g_object_ref (session); + item = soup_session_append_queue_item (session, msg, callback, user_data); thread = g_thread_new ("SoupSessionSync:queue_message", queue_message_thread, item); g_thread_unref (thread); @@ -345,11 +341,7 @@ soup_session_sync_send_message (SoupSession *session, SoupMessage *msg) SoupMessageQueueItem *item; guint status; - SOUP_SESSION_CLASS (soup_session_sync_parent_class)->queue_message (session, msg, NULL, NULL); - - item = soup_message_queue_lookup (soup_session_get_queue (session), msg); - g_return_val_if_fail (item != NULL, SOUP_STATUS_MALFORMED); - + item = soup_session_append_queue_item (session, msg, NULL, NULL); process_queue_item (item); status = msg->status_code; soup_message_queue_item_unref (item); @@ -475,10 +467,7 @@ soup_session_send_request (SoupSession *session, g_return_val_if_fail (SOUP_IS_SESSION_SYNC (session), NULL); - SOUP_SESSION_CLASS (soup_session_sync_parent_class)->queue_message (session, msg, NULL, NULL); - - item = soup_message_queue_lookup (soup_session_get_queue (session), msg); - g_return_val_if_fail (item != NULL, NULL); + item = soup_session_append_queue_item (session, msg, NULL, NULL); item->new_api = TRUE; if (cancellable) { |