Mercurial > pidgin
comparison src/dnssrv.c @ 11430:4b7087777411
[gaim-migrate @ 13667]
srv: fix for non 32-bit int plattforms
committer: Tailor Script <tailor@pidgin.im>
author | Thomas Butter <tbutter> |
---|---|
date | Fri, 02 Sep 2005 20:50:03 +0000 |
parents | d678a37c16d9 |
children | d3b870be8759 |
comparison
equal
deleted
inserted
replaced
11429:835dbb1b3337 | 11430:4b7087777411 |
---|---|
152 } else { | 152 } else { |
153 cp += dlen; | 153 cp += dlen; |
154 } | 154 } |
155 } | 155 } |
156 end: size = g_list_length(ret); | 156 end: size = g_list_length(ret); |
157 write(out, &size, 4); | 157 write(out, &size, sizeof(int)); |
158 while(g_list_first(ret)) { | 158 while(g_list_first(ret)) { |
159 write(out, g_list_first(ret)->data, sizeof(struct srv_response)); | 159 write(out, g_list_first(ret)->data, sizeof(struct srv_response)); |
160 g_free(g_list_first(ret)->data); | 160 g_free(g_list_first(ret)->data); |
161 ret = g_list_remove(ret, g_list_first(ret)->data); | 161 ret = g_list_remove(ret, g_list_first(ret)->data); |
162 } | 162 } |
173 struct srv_response *res; | 173 struct srv_response *res; |
174 struct srv_response *tmp; | 174 struct srv_response *tmp; |
175 int i; | 175 int i; |
176 SRVCallback cb = rdata->cb; | 176 SRVCallback cb = rdata->cb; |
177 | 177 |
178 read(source, &size, 4); | 178 read(source, &size, sizeof(int)); |
179 gaim_debug_info("srv","found %d SRV entries\n", size); | 179 gaim_debug_info("srv","found %d SRV entries\n", size); |
180 tmp = res = g_malloc0(sizeof(struct srv_response)*size); | 180 tmp = res = g_malloc0(sizeof(struct srv_response)*size); |
181 i = size; | 181 i = size; |
182 while(i) { | 182 while(i) { |
183 read(source, tmp++, sizeof(struct srv_response)); | 183 read(source, tmp++, sizeof(struct srv_response)); |