[gaim-migrate @ 15505]

Tue, 07 Feb 2006 01:21:38 +0000

author
Mark Doliner <markdoliner@pidgin.im>
date
Tue, 07 Feb 2006 01:21:38 +0000
changeset 13143
d0a29ff182c8
parent 13142
bc5e4271747f
child 13144
e8c3eafab5f8

[gaim-migrate @ 15505]
This fixes dns srv lookups, thanks to rlaager for telling me I'm dumb.

Also, for some reason he has access to a billion different Unixes.

src/dnssrv.c file | annotate | diff | comparison | revisions
--- a/src/dnssrv.c	Tue Feb 07 00:32:33 2006 +0000
+++ b/src/dnssrv.c	Tue Feb 07 01:21:38 2006 +0000
@@ -124,24 +124,19 @@
 
 		cp += size;
 
-		type = GUINT16_FROM_BE(*cp);
-		cp += 2;
+		GETSHORT(type,cp);
 
 		/* skip ttl and class since we already know it */
 		cp += 6;
 
-		dlen = GUINT16_FROM_BE(*cp);
-		cp += 2;
+		GETSHORT(dlen,cp);
 
 		if (type == T_SRV) {
-			pref = GUINT16_FROM_BE(*cp);
-			cp += 2;
+			GETSHORT(pref,cp);
 
-			weight = GUINT16_FROM_BE(*cp);
-			cp += 2;
+			GETSHORT(weight,cp);
 
-			port = GUINT16_FROM_BE(*cp);
-			cp += 2;
+			GETSHORT(port,cp);
 
 			size = dn_expand( (unsigned char*)&answer, end, cp, name, 256);
 			if(size < 0 )

mercurial