SoupSocket: Use the local socket, when available, even on client side.
authorJonh Wendell <jonh.wendell@oiwifi.com.br>
Tue, 5 Feb 2013 00:21:12 +0000 (22:21 -0200)
committerJonh Wendell <jonh.wendell@oiwifi.com.br>
Wed, 6 Feb 2013 13:33:12 +0000 (11:33 -0200)
This allows binding the client connection to a specific local address.

libsoup/soup-socket.c

index fd70dc8..df9a210 100644 (file)
@@ -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;
 }