changeset 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 3ac0000247e9
children bfd3aca4647a
files src/dnssrv.c
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/dnssrv.c	Fri Dec 09 06:21:21 2005 +0000
+++ b/src/dnssrv.c	Fri Dec 09 06:43:51 2005 +0000
@@ -225,7 +225,7 @@
 }
 
 static gpointer res_thread(gpointer data) {
-	DNS_RECORD *dr = NULL;
+	PDNS_RECORD *dr = NULL;
 	GSList *lst = NULL;
 	struct srv_response *srvres;
 	DNS_SRV_DATA *srv_data;
@@ -233,11 +233,11 @@
 	DNS_STATUS ds;
 	struct resdata *rdata = data;
 
-	ds = MyDnsQuery_UTF8(rdata->query, type, DNS_QUERY_STANDARD, NULL, &dr, NULL);
+	ds = MyDnsQuery_UTF8(rdata->query, type, DNS_QUERY_STANDARD, NULL, dr, NULL);
 	if (ds != ERROR_SUCCESS) {
 		rdata->errmsg = g_strdup_printf("Couldn't look up SRV record. Error = %d\n", (int) ds);
 	} else {
-		DNS_RECORD *dr_tmp = dr;
+		DNS_RECORD *dr_tmp = *dr;
 		while (dr_tmp != NULL) {
 			/* Discard any incorrect entries. I'm not sure if this is necessary */
 			if (dr_tmp->wType != type || strcmp(dr_tmp->pName, rdata->query) != 0) {
@@ -258,7 +258,7 @@
 			dr_tmp = dr_tmp->pNext;
 		}
 
-		MyDnsRecordListFree(dr, DnsFreeRecordList);
+		MyDnsRecordListFree(*dr, DnsFreeRecordList);
 		rdata->results = lst;
 	}