diff options
| author | ulim <a.sporto+bee@gmail.com> | 2008-06-02 14:58:57 +0200 | 
|---|---|---|
| committer | ulim <a.sporto+bee@gmail.com> | 2008-06-02 14:58:57 +0200 | 
| commit | c821e8ad0d1cf9ab71e6e34c685d0adea2dde923 (patch) | |
| tree | 0273986e236651d17157ccd3907f64242fd13da9 /lib/proxy.c | |
| parent | cce0450184b4358ef06d91cca985fa3ca389fcd6 (diff) | |
| parent | de8e584d7f4fea214934af094a4df2672d7e0be8 (diff) | |
merged in upstream r384. No conflicts.
Diffstat (limited to 'lib/proxy.c')
| -rw-r--r-- | lib/proxy.c | 11 | 
1 files changed, 11 insertions, 0 deletions
| diff --git a/lib/proxy.c b/lib/proxy.c index 53b89d64..91493557 100644 --- a/lib/proxy.c +++ b/lib/proxy.c @@ -113,6 +113,7 @@ static gboolean gaim_io_connected(gpointer data, gint source, b_input_condition  static int proxy_connect_none(const char *host, unsigned short port, struct PHB *phb)  {  	struct sockaddr_in *sin; +	struct sockaddr_in me;  	int fd = -1;  	if (!(sin = gaim_gethostbyname(host, port))) { @@ -127,6 +128,16 @@ static int proxy_connect_none(const char *host, unsigned short port, struct PHB  	sock_make_nonblocking(fd); +	if( global.conf->iface_out ) +	{ +		me.sin_family = AF_INET; +		me.sin_port = 0; +		me.sin_addr.s_addr = inet_addr( global.conf->iface_out ); +		 +		if( bind( fd, (struct sockaddr *) &me, sizeof( me ) ) != 0 ) +			event_debug( "bind( %d, \"%s\" ) failure\n", fd, global.conf->iface_out ); +	} +	  	event_debug("proxy_connect_none( \"%s\", %d ) = %d\n", host, port, fd);  	if (connect(fd, (struct sockaddr *)sin, sizeof(*sin)) < 0 && !sockerr_again()) { | 
