[libsoup] SoupSocket: Use the local socket, when available, even on client side.



commit 19aeb978add0f64f348e46909ec5c3bafc02e806
Author: Jonh Wendell <jonh wendell oiwifi com br>
Date:   Mon Feb 4 22:21:12 2013 -0200

    SoupSocket: Use the local socket, when available, even on client side.
    
    This allows binding the client connection to a specific local address.

 libsoup/soup-socket.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/libsoup/soup-socket.c b/libsoup/soup-socket.c
index fd70dc8..df9a210 100644
--- a/libsoup/soup-socket.c
+++ b/libsoup/soup-socket.c
@@ -712,6 +712,9 @@ new_socket_client (SoupSocket *sock)
 	if (priv->timeout)
 		g_socket_client_set_timeout (client, priv->timeout);
 
+	if (priv->local_addr)
+		g_socket_client_set_local_address (client, soup_address_get_gsockaddr (priv->local_addr));
+
 	return client;
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]