--- a/libpurple/Makefile.mingw Wed Apr 10 16:32:00 2013 +0200
+++ b/libpurple/Makefile.mingw Sat Apr 13 12:22:38 2013 -0400
@@ -117,6 +117,7 @@
--- a/libpurple/dnssrv.c Wed Apr 10 16:32:00 2013 +0200
+++ b/libpurple/dnssrv.c Sat Apr 13 12:22:38 2013 -0400
@@ -61,13 +61,6 @@
-static DNS_STATUS (WINAPI *MyDnsQuery_UTF8) (
- PCSTR lpstrName, WORD wType, DWORD fOptions,
- PIP4_ARRAY aipServers, PDNS_RECORD* ppQueryResultsSet,
- PVOID* pReserved) = NULL;
-static void (WINAPI *MyDnsRecordListFree) (PDNS_RECORD pRecordList,
- DNS_FREE_TYPE FreeType) = NULL;
struct _PurpleSrvTxtQueryData {
@@ -646,7 +639,7 @@
PurpleSrvTxtQueryData *query_data = data;
- ds = MyDnsQuery_UTF8(query_data->query, type, DNS_QUERY_STANDARD, NULL, &dr, NULL);
+ ds = DnsQuery_UTF8(query_data->query, type, DNS_QUERY_STANDARD, NULL, &dr, NULL); if (ds != ERROR_SUCCESS) {
gchar *msg = g_win32_error_message(ds);
if (type == DNS_TYPE_SRV) {
@@ -679,7 +672,7 @@
lst = g_list_prepend(lst, srvres);
- MyDnsRecordListFree(dr, DnsFreeRecordList);
+ DnsRecordListFree(dr, DnsFreeRecordList); query_data->results = purple_srv_sort(lst);
} else if (type == DNS_TYPE_TXT) {
@@ -707,7 +700,7 @@
lst = g_list_append(lst, txtres);
- MyDnsRecordListFree(dr, DnsFreeRecordList);
+ DnsRecordListFree(dr, DnsFreeRecordList); query_data->results = lst;
@@ -747,7 +740,6 @@
- static gboolean initialized = FALSE;
if (!protocol || !*protocol || !transport || !*transport || !domain || !*domain) {
@@ -836,21 +828,10 @@
- MyDnsQuery_UTF8 = (void*) wpurple_find_and_loadproc("dnsapi.dll", "DnsQuery_UTF8");
- MyDnsRecordListFree = (void*) wpurple_find_and_loadproc(
- "dnsapi.dll", "DnsRecordListFree");
- if (!MyDnsQuery_UTF8 || !MyDnsRecordListFree)
- query_data->error_message = g_strdup("System missing DNS API (Requires W2K+)\n");
- query_data->resolver = g_thread_create(res_thread, query_data, FALSE, &err);
- if (query_data->resolver == NULL) {
- query_data->error_message = g_strdup_printf("SRV thread create failure: %s\n", (err && err->message) ? err->message : "");
+ query_data->resolver = g_thread_create(res_thread, query_data, FALSE, &err); + if (query_data->resolver == NULL) { + query_data->error_message = g_strdup_printf("SRV thread create failure: %s\n", (err && err->message) ? err->message : ""); /* The query isn't going to happen, so finish the SRV lookup now.
@@ -883,7 +864,6 @@
- static gboolean initialized = FALSE;
proxy_type = purple_proxy_info_get_type(
@@ -967,21 +947,10 @@
- MyDnsQuery_UTF8 = (void*) wpurple_find_and_loadproc("dnsapi.dll", "DnsQuery_UTF8");
- MyDnsRecordListFree = (void*) wpurple_find_and_loadproc(
- "dnsapi.dll", "DnsRecordListFree");
- if (!MyDnsQuery_UTF8 || !MyDnsRecordListFree)
- query_data->error_message = g_strdup("System missing DNS API (Requires W2K+)\n");
- query_data->resolver = g_thread_create(res_thread, query_data, FALSE, &err);
- if (query_data->resolver == NULL) {
- query_data->error_message = g_strdup_printf("TXT thread create failure: %s\n", (err && err->message) ? err->message : "");
+ query_data->resolver = g_thread_create(res_thread, query_data, FALSE, &err); + if (query_data->resolver == NULL) { + query_data->error_message = g_strdup_printf("TXT thread create failure: %s\n", (err && err->message) ? err->message : ""); /* The query isn't going to happen, so finish the TXT lookup now.