diff options
author | Sven Neumann <neumann@teufel.de> | 2014-11-17 15:22:50 +0100 |
---|---|---|
committer | Jens Georg <mail@jensge.org> | 2015-01-03 10:50:46 +0100 |
commit | d43006b7c1e59fab5425137d43bc241a04e5504e (patch) | |
tree | 0d6abc4995bf73a3d5a05108f7e9ce8b3c9ce2d1 | |
parent | 62eb328449e956fb146f1fe024ff798e5191e4f4 (diff) | |
download | gupnp-d43006b7c1e59fab5425137d43bc241a04e5504e.tar.gz |
Stop using the deprecated SoupSessionAsync
As of libsoup 2.42, this is deprecated in favor of the plain
SoupSession class. The plain SoupSession also already has
a SoupContentDecoder attached to it by default, so we can
omit doing this explicitly.
Signed-off-by: Sven Neumann <neumann@teufel.de>
https://bugzilla.gnome.org/show_bug.cgi?id=740267
-rw-r--r-- | libgupnp/gupnp-context.c | 10 | ||||
-rw-r--r-- | libgupnp/gupnp-service.c | 8 | ||||
-rw-r--r-- | tests/gtest/test-context.c | 2 |
3 files changed, 4 insertions, 16 deletions
diff --git a/libgupnp/gupnp-context.c b/libgupnp/gupnp-context.c index e145c69..bc0e16e 100644 --- a/libgupnp/gupnp-context.c +++ b/libgupnp/gupnp-context.c @@ -191,12 +191,7 @@ gupnp_context_initable_init (GInitable *initable, context = GUPNP_CONTEXT (initable); - context->priv->session = soup_session_async_new_with_options - (SOUP_SESSION_IDLE_TIMEOUT, - 60, - SOUP_SESSION_ASYNC_CONTEXT, - g_main_context_get_thread_default (), - NULL); + context->priv->session = soup_session_new (); user_agent = g_strdup_printf ("%s GUPnP/" VERSION " DLNADOC/1.50", g_get_prgname ()? : ""); @@ -213,9 +208,6 @@ gupnp_context_initable_init (GInitable *initable, SOUP_SESSION_FEATURE (logger)); } - soup_session_add_feature_by_type (context->priv->session, - SOUP_TYPE_CONTENT_DECODER); - /* Create the server already if the port is not null*/ if (context->priv->port != 0) { gupnp_context_get_server (context); diff --git a/libgupnp/gupnp-service.c b/libgupnp/gupnp-service.c index d971118..fbccdb7 100644 --- a/libgupnp/gupnp-service.c +++ b/libgupnp/gupnp-service.c @@ -126,12 +126,8 @@ gupnp_service_get_session (GUPnPService *service) * order. The session from GUPnPContext may use * multiple connections. */ - service->priv->session = soup_session_async_new_with_options - (SOUP_SESSION_IDLE_TIMEOUT, 60, - SOUP_SESSION_ASYNC_CONTEXT, - g_main_context_get_thread_default (), - SOUP_SESSION_MAX_CONNS_PER_HOST, 1, - NULL); + service->priv->session = soup_session_new_with_options (SOUP_SESSION_MAX_CONNS_PER_HOST, 1, + NULL); if (g_getenv ("GUPNP_DEBUG")) { SoupLogger *logger; diff --git a/tests/gtest/test-context.c b/tests/gtest/test-context.c index bbcfd27..0bfda7c 100644 --- a/tests/gtest/test-context.c +++ b/tests/gtest/test-context.c @@ -149,7 +149,7 @@ test_gupnp_context_http_ranged_requests (void) uri = g_strdup_printf ("http://127.0.0.1:%u/random4k.bin", port); g_assert (uri != NULL); - session = soup_session_async_new (); + session = soup_session_new (); /* Corner cases: First byte */ request_range_and_compare (file, session, loop, uri, 0, 0); |