summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_thread.cpp
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2013-09-21 20:23:22 +0000
committerKirill Volinsky <mataes2007@gmail.com>2013-09-21 20:23:22 +0000
commit52824c91bac6d6cc0f04e242b07d9031477b6362 (patch)
tree3cafc4ce886f9066b50d4d32bfdda4c5c9f954f4 /protocols/JabberG/src/jabber_thread.cpp
parentb4caa062df453412e7cafa5b96afab0b0c3a2940 (diff)
protocols cleanup
git-svn-id: http://svn.miranda-ng.org/main/trunk@6170 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src/jabber_thread.cpp')
-rw-r--r--protocols/JabberG/src/jabber_thread.cpp21
1 files changed, 2 insertions, 19 deletions
diff --git a/protocols/JabberG/src/jabber_thread.cpp b/protocols/JabberG/src/jabber_thread.cpp
index 1f68a2eee7..420544d65c 100644
--- a/protocols/JabberG/src/jabber_thread.cpp
+++ b/protocols/JabberG/src/jabber_thread.cpp
@@ -146,9 +146,6 @@ void CJabberProto::OnPingReply(HXML, CJabberIqInfo* pInfo)
/////////////////////////////////////////////////////////////////////////////////////////
-typedef DNS_STATUS (WINAPI *DNSQUERYA)(IN PCSTR pszName, IN WORD wType, IN DWORD Options, IN PIP4_ARRAY aipServers OPTIONAL, IN OUT PDNS_RECORDA *ppQueryResults OPTIONAL, IN OUT PVOID *pReserved OPTIONAL);
-typedef void (WINAPI *DNSFREELIST)(IN OUT PDNS_RECORDA pRecordList, IN DNS_FREE_TYPE FreeType);
-
static int CompareDNS(const DNS_SRV_DATAA* dns1, const DNS_SRV_DATAA* dns2)
{
return (int)dns1->wPriority - (int)dns2->wPriority;
@@ -159,23 +156,11 @@ void ThreadData::xmpp_client_query(void)
if (inet_addr(server) != INADDR_NONE)
return;
- HMODULE hDnsapi = LoadLibraryA("dnsapi.dll");
- if (hDnsapi == NULL)
- return;
-
- DNSQUERYA pDnsQuery = (DNSQUERYA)GetProcAddress(hDnsapi, "DnsQuery_A");
- DNSFREELIST pDnsRecordListFree = (DNSFREELIST)GetProcAddress(hDnsapi, "DnsRecordListFree");
- if (pDnsQuery == NULL) {
- //dnsapi.dll is not the needed dnsapi ;)
- FreeLibrary(hDnsapi);
- return;
- }
-
char temp[256];
mir_snprintf(temp, SIZEOF(temp), "_xmpp-client._tcp.%s", server);
DNS_RECORDA *results = NULL;
- DNS_STATUS status = pDnsQuery(temp, DNS_TYPE_SRV, DNS_QUERY_STANDARD, NULL, &results, NULL);
+ DNS_STATUS status = DnsQuery_A(temp, DNS_TYPE_SRV, DNS_QUERY_STANDARD, NULL, (PDNS_RECORD *)&results, NULL);
if (SUCCEEDED(status) && results) {
LIST<DNS_SRV_DATAA> dnsList(5, CompareDNS);
@@ -196,12 +181,10 @@ void ThreadData::xmpp_client_query(void)
break;
} }
dnsList.destroy();
- pDnsRecordListFree(results, DnsFreeRecordList);
+ DnsRecordListFree(results, DnsFreeRecordList);
}
else
proto->Log("%s not resolved", temp);
-
- FreeLibrary(hDnsapi);
}
void CJabberProto::xmlStreamInitialize(char *szWhich)