Mercurial > pidgin
diff src/protocols/qq/udp_proxy_s5.c @ 14045:3cefea0bf4a2
[gaim-migrate @ 16657]
Took care of some signedness issues.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Huetsch <markhuetsch> |
---|---|
date | Sun, 06 Aug 2006 21:03:10 +0000 |
parents | ef8490f9e823 |
children | 8ea1929c4c69 |
line wrap: on
line diff
--- a/src/protocols/qq/udp_proxy_s5.c Sun Aug 06 18:19:36 2006 +0000 +++ b/src/protocols/qq/udp_proxy_s5.c Sun Aug 06 21:03:10 2006 +0000 @@ -33,7 +33,7 @@ unsigned char buf[512]; struct PHB *phb = data; struct sockaddr_in sin; - int len; + int len, error; gaim_input_remove(phb->inpa); gaim_debug(GAIM_DEBUG_INFO, "socks5 proxy", "Able to read again.\n"); @@ -82,7 +82,7 @@ return; } - int error = ETIMEDOUT; + error = ETIMEDOUT; gaim_debug(GAIM_DEBUG_INFO, "QQ", "Connect didn't block\n"); len = sizeof(error); if (getsockopt(phb->udpsock, SOL_SOCKET, SO_ERROR, &error, &len) < 0) { @@ -209,12 +209,15 @@ static void _qq_s5_canread(gpointer data, gint source, GaimInputCondition cond) { unsigned char buf[512]; - struct PHB *phb = data; + struct PHB *phb; + int ret; + + phb = data; gaim_input_remove(phb->inpa); gaim_debug(GAIM_DEBUG_INFO, "socks5 proxy", "Able to read.\n"); - int ret = read(source, buf, 2); + ret = read(source, buf, 2); if (ret < 2) { gaim_debug(GAIM_DEBUG_INFO, "s5_canread", "packet smaller than 2 octet\n"); close(source); @@ -275,7 +278,7 @@ } } -void _qq_s5_canwrite(gpointer data, gint source, GaimInputCondition cond) +static void _qq_s5_canwrite(gpointer data, gint source, GaimInputCondition cond) { unsigned char buf[512]; int i;