Mercurial > pidgin
diff libpurple/protocols/oscar/family_locate.c @ 23313:9c0ee2491ed1
Replaced family_*'s magic numbers of FLAP families with the constants
defined in snactypes.h
author | Evan Schoenberg <evan.s@dreskin.net> |
---|---|
date | Sat, 07 Jun 2008 18:42:48 +0000 |
parents | ab2322195dab |
children | b3ec26e66e26 |
line wrap: on
line diff
--- a/libpurple/protocols/oscar/family_locate.c Sat Jun 07 18:42:12 2008 +0000 +++ b/libpurple/protocols/oscar/family_locate.c Sat Jun 07 18:42:48 2008 +0000 @@ -943,7 +943,7 @@ return 0; } - if ((snac2->family != 0x0002) && (snac2->type != 0x0015)) { + if ((snac2->family != SNAC_FAMILY_LOCATE) && (snac2->type != 0x0015)) { purple_debug_misc("oscar", "faim: locate.c, error(): received response from invalid request! %d\n", snac2->family); return 0; } @@ -1094,12 +1094,12 @@ byte_stream_new(&bs, aim_tlvlist_size(tlvlist)); - snacid = aim_cachesnac(od, 0x0002, 0x0004, 0x0000, NULL, 0); + snacid = aim_cachesnac(od, SNAC_FAMILY_LOCATE, 0x0004, 0x0000, NULL, 0); aim_tlvlist_write(&bs, &tlvlist); aim_tlvlist_free(tlvlist); - flap_connection_send_snac(od, conn, 0x0002, 0x0004, 0x0000, snacid, &bs); + flap_connection_send_snac(od, conn, SNAC_FAMILY_LOCATE, 0x0004, 0x0000, snacid, &bs); byte_stream_destroy(&bs); @@ -1124,12 +1124,12 @@ byte_stream_new(&bs, aim_tlvlist_size(tlvlist)); - snacid = aim_cachesnac(od, 0x0002, 0x0004, 0x0000, NULL, 0); + snacid = aim_cachesnac(od, SNAC_FAMILY_LOCATE, 0x0004, 0x0000, NULL, 0); aim_tlvlist_write(&bs, &tlvlist); aim_tlvlist_free(tlvlist); - flap_connection_send_snac(od, conn, 0x0002, 0x0004, 0x0000, snacid, &bs); + flap_connection_send_snac(od, conn, SNAC_FAMILY_LOCATE, 0x0004, 0x0000, snacid, &bs); byte_stream_destroy(&bs); @@ -1157,13 +1157,13 @@ byte_stream_new(&bs, 2+1+strlen(sn)); - snacid = aim_cachesnac(od, 0x0002, 0x0005, 0x0000, NULL, 0); + snacid = aim_cachesnac(od, SNAC_FAMILY_LOCATE, 0x0005, 0x0000, NULL, 0); byte_stream_put16(&bs, infotype); byte_stream_put8(&bs, strlen(sn)); byte_stream_putstr(&bs, sn); - flap_connection_send_snac(od, conn, 0x0002, 0x0005, 0x0000, snacid, &bs); + flap_connection_send_snac(od, conn, SNAC_FAMILY_LOCATE, 0x0005, 0x0000, snacid, &bs); byte_stream_destroy(&bs); @@ -1274,12 +1274,12 @@ byte_stream_new(&bs, aim_tlvlist_size(tlvlist)); - snacid = aim_cachesnac(od, 0x0002, 0x0009, 0x0000, NULL, 0); + snacid = aim_cachesnac(od, SNAC_FAMILY_LOCATE, 0x0009, 0x0000, NULL, 0); aim_tlvlist_write(&bs, &tlvlist); aim_tlvlist_free(tlvlist); - flap_connection_send_snac(od, conn, 0x0002, 0x0009, 0x0000, snacid, &bs); + flap_connection_send_snac(od, conn, SNAC_FAMILY_LOCATE, 0x0009, 0x0000, snacid, &bs); byte_stream_destroy(&bs); @@ -1302,12 +1302,12 @@ byte_stream_new(&bs, 1+strlen(sn)); - snacid = aim_cachesnac(od, 0x0002, 0x000b, 0x0000, NULL, 0); + snacid = aim_cachesnac(od, SNAC_FAMILY_LOCATE, 0x000b, 0x0000, NULL, 0); byte_stream_put8(&bs, strlen(sn)); byte_stream_putstr(&bs, sn); - flap_connection_send_snac(od, conn, 0x0002, 0x000b, 0x0000, snacid, &bs); + flap_connection_send_snac(od, conn, SNAC_FAMILY_LOCATE, 0x000b, 0x0000, snacid, &bs); byte_stream_destroy(&bs); @@ -1347,12 +1347,12 @@ byte_stream_new(&bs, aim_tlvlist_size(tlvlist)); - snacid = aim_cachesnac(od, 0x0002, 0x000f, 0x0000, NULL, 0); + snacid = aim_cachesnac(od, SNAC_FAMILY_LOCATE, 0x000f, 0x0000, NULL, 0); aim_tlvlist_write(&bs, &tlvlist); aim_tlvlist_free(tlvlist); - flap_connection_send_snac(od, conn, 0x0002, 0x000f, 0x0000, snacid, &bs); + flap_connection_send_snac(od, conn, SNAC_FAMILY_LOCATE, 0x000f, 0x0000, snacid, &bs); byte_stream_destroy(&bs); return 0; @@ -1385,8 +1385,8 @@ byte_stream_put8(&bs, strlen(sn)); byte_stream_putstr(&bs, sn); - snacid = aim_cachesnac(od, 0x0002, 0x0015, 0x0000, sn, strlen(sn)+1); - flap_connection_send_snac(od, conn, 0x0002, 0x0015, 0x0000, snacid, &bs); + snacid = aim_cachesnac(od, SNAC_FAMILY_LOCATE, 0x0015, 0x0000, sn, strlen(sn)+1); + flap_connection_send_snac(od, conn, SNAC_FAMILY_LOCATE, 0x0015, 0x0000, snacid, &bs); byte_stream_destroy(&bs);