pidgin: 5159e168: We should be using the type listed in th...
markdoliner at pidgin.im
markdoliner at pidgin.im
Tue Feb 2 15:45:48 EST 2010
-----------------------------------------------------------------
Revision: 5159e1686c22cb2ffbbc4bc4abe577e93c9f4678
Ancestor: 46a55cc96572a5407be3c98301b03f9466a7cb40
Author: markdoliner at pidgin.im
Date: 2010-02-02T20:42:00
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/5159e1686c22cb2ffbbc4bc4abe577e93c9f4678
Modified files:
libpurple/dnssrv.c
ChangeLog:
We should be using the type listed in the response, not in the
query. Because who knows what the server is going to respond
with? I noticed this when trying to connect to an XMPP account
on jabber.linuxlovers.at. They return a CNAME when querying for
SRV--I don't know if that's actually valid.
$ dig srv _xmpp-client._tcp.jabber.linuxlovers.at
;; ANSWER SECTION:
_xmpp-client._tcp.jabber.linuxlovers.at. 85361 IN CNAME jabber.linuxlovers.at.
-------------- next part --------------
============================================================
--- libpurple/dnssrv.c 6264d6837b73fbc87e6e4218ccb72280e57ae7c8
+++ libpurple/dnssrv.c bc973d891789794200b1c72a732ee8949f86fb43
@@ -366,7 +366,7 @@ resolve(int in, int out)
cp += 6;
GETSHORT(dlen,cp);
- if (query.type == T_SRV) {
+ if (type == T_SRV) {
GETSHORT(pref,cp);
GETSHORT(weight,cp);
@@ -386,7 +386,7 @@ resolve(int in, int out)
srvres->weight = weight;
ret = g_list_prepend(ret, srvres);
- } else if (query.type == T_TXT) {
+ } else if (type == T_TXT) {
txtres = g_new0(PurpleTxtResponse, 1);
txtres->content = g_strndup((gchar*)(++cp), dlen-1);
ret = g_list_append(ret, txtres);
More information about the Commits
mailing list