[libsoup] SoupServer: fix non-default-main-context usage
- From: Dan Winship <danw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsoup] SoupServer: fix non-default-main-context usage
- Date: Wed, 18 Jul 2012 21:44:09 +0000 (UTC)
commit 6423ba1af88491d580715813a2aa72deb7ece95e
Author: Dan Winship <danw gnome org>
Date: Wed Jul 18 17:43:12 2012 -0400
SoupServer: fix non-default-main-context usage
Need to push the server's async_context around doing message I/O to
make sure all the responses come back to the right place.
libsoup/soup-server.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/libsoup/soup-server.c b/libsoup/soup-server.c
index 5dcafa1..1e462ea 100644
--- a/libsoup/soup-server.c
+++ b/libsoup/soup-server.c
@@ -938,8 +938,13 @@ start_request (SoupServer *server, SoupClientContext *client)
msg, client);
g_object_ref (client->sock);
+
+ if (priv->async_context)
+ g_main_context_push_thread_default (priv->async_context);
soup_message_read_request (msg, client->sock,
request_finished, client);
+ if (priv->async_context)
+ g_main_context_pop_thread_default (priv->async_context);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]