# HG changeset patch # User Mark Doliner # Date 1139275298 0 # Node ID 386a4f784cde67158cd2d9bd8350d824f602f02c # Parent 39e7014cb687fb302d7ee51d2c87fd9ca2b8dc5d [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 diff -r 39e7014cb687 -r 386a4f784cde src/dnssrv.c --- 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 )