Mercurial > pidgin.yaz
changeset 11426:d678a37c16d9
[gaim-migrate @ 13663]
returned wrong number of results
committer: Tailor Script <tailor@pidgin.im>
author | Thomas Butter <tbutter> |
---|---|
date | Fri, 02 Sep 2005 19:33:53 +0000 |
parents | 54fa445aff32 |
children | e2ebebcae270 |
files | src/dnssrv.c |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/dnssrv.c Fri Sep 02 18:05:40 2005 +0000 +++ b/src/dnssrv.c Fri Sep 02 19:33:53 2005 +0000 @@ -172,14 +172,16 @@ struct resdata *rdata = (struct resdata*)data; struct srv_response *res; struct srv_response *tmp; + int i; SRVCallback cb = rdata->cb; read(source, &size, 4); gaim_debug_info("srv","found %d SRV entries\n", size); tmp = res = g_malloc0(sizeof(struct srv_response)*size); - while(size) { + i = size; + while(i) { read(source, tmp++, sizeof(struct srv_response)); - size--; + i--; } cb(res, size, rdata->extradata); gaim_input_remove(rdata->handle);