Mercurial > pidgin
comparison src/dnssrv.c @ 12439:97167ff86683
[gaim-migrate @ 14746]
Holy crap this was a pain to track down. Before this change,
the value of lst was getting overwritten, I guess by the output
of the DNS query. After this change I'm able to attempt to
sign on to SIP in Windows. I'm getting "Wrong Password" now.
Not sure what's up with that. I'll try to figure something out
at work tomorrow. But hey, at least it's not crashing anymore.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Fri, 09 Dec 2005 06:43:51 +0000 |
parents | 8d019c4bf454 |
children | 933fda51587e |
comparison
equal
deleted
inserted
replaced
12438:3ac0000247e9 | 12439:97167ff86683 |
---|---|
223 | 223 |
224 return FALSE; | 224 return FALSE; |
225 } | 225 } |
226 | 226 |
227 static gpointer res_thread(gpointer data) { | 227 static gpointer res_thread(gpointer data) { |
228 DNS_RECORD *dr = NULL; | 228 PDNS_RECORD *dr = NULL; |
229 GSList *lst = NULL; | 229 GSList *lst = NULL; |
230 struct srv_response *srvres; | 230 struct srv_response *srvres; |
231 DNS_SRV_DATA *srv_data; | 231 DNS_SRV_DATA *srv_data; |
232 int type = DNS_TYPE_SRV; | 232 int type = DNS_TYPE_SRV; |
233 DNS_STATUS ds; | 233 DNS_STATUS ds; |
234 struct resdata *rdata = data; | 234 struct resdata *rdata = data; |
235 | 235 |
236 ds = MyDnsQuery_UTF8(rdata->query, type, DNS_QUERY_STANDARD, NULL, &dr, NULL); | 236 ds = MyDnsQuery_UTF8(rdata->query, type, DNS_QUERY_STANDARD, NULL, dr, NULL); |
237 if (ds != ERROR_SUCCESS) { | 237 if (ds != ERROR_SUCCESS) { |
238 rdata->errmsg = g_strdup_printf("Couldn't look up SRV record. Error = %d\n", (int) ds); | 238 rdata->errmsg = g_strdup_printf("Couldn't look up SRV record. Error = %d\n", (int) ds); |
239 } else { | 239 } else { |
240 DNS_RECORD *dr_tmp = dr; | 240 DNS_RECORD *dr_tmp = *dr; |
241 while (dr_tmp != NULL) { | 241 while (dr_tmp != NULL) { |
242 /* Discard any incorrect entries. I'm not sure if this is necessary */ | 242 /* Discard any incorrect entries. I'm not sure if this is necessary */ |
243 if (dr_tmp->wType != type || strcmp(dr_tmp->pName, rdata->query) != 0) { | 243 if (dr_tmp->wType != type || strcmp(dr_tmp->pName, rdata->query) != 0) { |
244 dr_tmp = dr_tmp->pNext; | 244 dr_tmp = dr_tmp->pNext; |
245 continue; | 245 continue; |
256 lst = g_slist_insert_sorted(lst, srvres, responsecompare); | 256 lst = g_slist_insert_sorted(lst, srvres, responsecompare); |
257 | 257 |
258 dr_tmp = dr_tmp->pNext; | 258 dr_tmp = dr_tmp->pNext; |
259 } | 259 } |
260 | 260 |
261 MyDnsRecordListFree(dr, DnsFreeRecordList); | 261 MyDnsRecordListFree(*dr, DnsFreeRecordList); |
262 rdata->results = lst; | 262 rdata->results = lst; |
263 } | 263 } |
264 | 264 |
265 /* back to main thread */ | 265 /* back to main thread */ |
266 g_idle_add(res_main_thread_cb, rdata); | 266 g_idle_add(res_main_thread_cb, rdata); |