changeset 13142:386a4f784cde

[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. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Tue, 07 Feb 2006 01:21:38 +0000
parents 39e7014cb687
children a1d5f154585b
files src/dnssrv.c
diffstat 1 files changed, 5 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- 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 )