diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2015-01-17 20:13:19 +0000 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2015-01-17 20:13:19 +0000 |
commit | eb4ad8d31f7ed4210f24beb8753ecce594b0beef (patch) | |
tree | f7f9cf04738522a79f874e0e8ce9b915014861fc /lib/proxy.c | |
parent | 1065dd4f38c81c83934ba51526471072837700ae (diff) | |
parent | 664bac38fcdf6889d3ceb29b73a0c3a4e27820ce (diff) |
Merging random other fixes/cleanups.
Diffstat (limited to 'lib/proxy.c')
-rw-r--r-- | lib/proxy.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/proxy.c b/lib/proxy.c index 86bb0dcc..2e0dc2cf 100644 --- a/lib/proxy.c +++ b/lib/proxy.c @@ -65,7 +65,7 @@ static int proxy_connect_none(const char *host, unsigned short port_, struct PHB static gboolean gaim_io_connected(gpointer data, gint source, b_input_condition cond) { struct PHB *phb = data; - unsigned int len; + socklen_t len; int error = ETIMEDOUT; len = sizeof(error); @@ -85,6 +85,7 @@ static gboolean gaim_io_connected(gpointer data, gint source, b_input_condition freeaddrinfo(phb->gai); closesocket(source); b_event_remove(phb->inpa); + phb->inpa = 0; if( phb->proxy_func ) phb->proxy_func(phb->proxy_data, -1, B_EV_IO_READ); else { @@ -96,6 +97,7 @@ static gboolean gaim_io_connected(gpointer data, gint source, b_input_condition freeaddrinfo(phb->gai); sock_make_blocking(source); b_event_remove(phb->inpa); + phb->inpa = 0; if( phb->proxy_func ) phb->proxy_func(phb->proxy_data, source, B_EV_IO_READ); else { @@ -173,8 +175,8 @@ static int proxy_connect_none(const char *host, unsigned short port_, struct PHB /* Connecting to HTTP proxies */ -#define HTTP_GOODSTRING "HTTP/1.0 200 Connection established" -#define HTTP_GOODSTRING2 "HTTP/1.1 200 Connection established" +#define HTTP_GOODSTRING "HTTP/1.0 200" +#define HTTP_GOODSTRING2 "HTTP/1.1 200" static gboolean http_canread(gpointer data, gint source, b_input_condition cond) { @@ -213,7 +215,7 @@ static gboolean http_canwrite(gpointer data, gint source, b_input_condition cond { char cmd[384]; struct PHB *phb = data; - unsigned int len; + socklen_t len; int error = ETIMEDOUT; if (phb->inpa > 0) b_event_remove(phb->inpa); @@ -308,7 +310,7 @@ static gboolean s4_canwrite(gpointer data, gint source, b_input_condition cond) unsigned char packet[12]; struct hostent *hp; struct PHB *phb = data; - unsigned int len; + socklen_t len; int error = ETIMEDOUT; if (phb->inpa > 0) b_event_remove(phb->inpa); @@ -500,7 +502,7 @@ static gboolean s5_canwrite(gpointer data, gint source, b_input_condition cond) unsigned char buf[512]; int i; struct PHB *phb = data; - unsigned int len; + socklen_t len; int error = ETIMEDOUT; if (phb->inpa > 0) b_event_remove(phb->inpa); |