Mercurial > pidgin.yaz
comparison src/protocols/msn/httpconn.c @ 13277:2a9580fc922b
[gaim-migrate @ 15643]
Richard Nelson noticed that this comparison was potentially problematic due to signedness issues.
committer: Tailor Script <tailor@pidgin.im>
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Mon, 13 Feb 2006 20:06:09 +0000 |
parents | 8754a0fe2297 |
children | 4279e5b5e9ac |
comparison
equal
deleted
inserted
replaced
13276:d6a799421657 | 13277:2a9580fc922b |
---|---|
160 if (res <= 0 && errno != EAGAIN) | 160 if (res <= 0 && errno != EAGAIN) |
161 { | 161 { |
162 msn_servconn_got_error(httpconn->servconn, | 162 msn_servconn_got_error(httpconn->servconn, |
163 MSN_SERVCONN_ERROR_WRITE); | 163 MSN_SERVCONN_ERROR_WRITE); |
164 return -1; | 164 return -1; |
165 } else if (res < data_len) { | 165 } else if (res < 0 || res < data_len) { |
166 if (res < 0) | 166 if (res < 0) |
167 res = 0; | 167 res = 0; |
168 if (httpconn->tx_handler == -1) | 168 if (httpconn->tx_handler == -1) |
169 httpconn->tx_handler = gaim_input_add(httpconn->fd, | 169 httpconn->tx_handler = gaim_input_add(httpconn->fd, |
170 GAIM_INPUT_WRITE, httpconn_write_cb, httpconn); | 170 GAIM_INPUT_WRITE, httpconn_write_cb, httpconn); |