[libsoup/wip/http2: 5/7] SoupAuthManager: simplify, don't depend on SoupMessageQueue
- From: Dan Winship <danw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsoup/wip/http2: 5/7] SoupAuthManager: simplify, don't depend on SoupMessageQueue
- Date: Tue, 18 Mar 2014 21:18:49 +0000 (UTC)
commit a211f504da722771c7cfef393d7e040e714b6c2c
Author: Dan Winship <danw gnome org>
Date: Tue Dec 10 14:44:15 2013 +0100
SoupAuthManager: simplify, don't depend on SoupMessageQueue
Rather than calling soup_session_get_queue() and getting the message's
connection via its' queue item, just call soup_message_get_connection().
libsoup/soup-auth-manager.c | 16 +++++-----------
1 files changed, 5 insertions(+), 11 deletions(-)
---
diff --git a/libsoup/soup-auth-manager.c b/libsoup/soup-auth-manager.c
index f40a928..5b50fcd 100644
--- a/libsoup/soup-auth-manager.c
+++ b/libsoup/soup-auth-manager.c
@@ -17,7 +17,6 @@
#include "soup-message-private.h"
#include "soup-message-queue.h"
#include "soup-path-map.h"
-#include "soup-session-private.h"
/**
* SECTION:soup-auth-manager
@@ -465,21 +464,16 @@ authenticate_auth (SoupAuthManager *manager, SoupAuth *auth,
SoupMessage *msg, gboolean prior_auth_failed,
gboolean proxy, gboolean can_interact)
{
- SoupAuthManagerPrivate *priv = manager->priv;
SoupURI *uri;
if (proxy) {
- SoupMessageQueue *queue;
- SoupMessageQueueItem *item;
+ SoupConnection *conn;
- queue = soup_session_get_queue (priv->session);
- item = soup_message_queue_lookup (queue, msg);
- if (item) {
- uri = soup_connection_get_proxy_uri (item->conn);
- soup_message_queue_item_unref (item);
- } else
- uri = NULL;
+ conn = soup_message_get_connection (msg);
+ if (!conn)
+ return;
+ uri = soup_connection_get_proxy_uri (conn);
if (!uri)
return;
} else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]