aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-11-15 15:29:47 +0100
committerJelmer Vernooij <jelmer@samba.org>2005-11-15 15:29:47 +0100
commitfbc78447e1e49b42cd1e8ba7e753f0635ec5e021 (patch)
tree967cfc206990eba9723666ffb1fb1cfc798f2a0c
parentc1ede6e8035b0338e0254fbfcbbddfeb608b1269 (diff)
Remove some unused code in oscar
-rw-r--r--protocols/oscar/auth.c8
-rw-r--r--protocols/oscar/tlv.c42
2 files changed, 9 insertions, 41 deletions
diff --git a/protocols/oscar/auth.c b/protocols/oscar/auth.c
index c25a4604..eb6a9d64 100644
--- a/protocols/oscar/auth.c
+++ b/protocols/oscar/auth.c
@@ -351,17 +351,11 @@ int aim_encode_password_md5(const char *password, const char *key, guint8 *diges
static int aim_encode_password(const char *password, guint8 *encoded)
{
guint8 encoding_table[] = {
-#if 0 /* old v1 table */
- 0xf3, 0xb3, 0x6c, 0x99,
- 0x95, 0x3f, 0xac, 0xb6,
- 0xc5, 0xfa, 0x6b, 0x63,
- 0x69, 0x6c, 0xc3, 0x9f
-#else /* v2.1 table, also works for ICQ */
+ /* v2.1 table, also works for ICQ */
0xf3, 0x26, 0x81, 0xc4,
0x39, 0x86, 0xdb, 0x92,
0x71, 0xa3, 0xb9, 0xe6,
0x53, 0x7a, 0x95, 0x7c
-#endif
};
int i;
diff --git a/protocols/oscar/tlv.c b/protocols/oscar/tlv.c
index 74d177ad..11b89758 100644
--- a/protocols/oscar/tlv.c
+++ b/protocols/oscar/tlv.c
@@ -1,21 +1,13 @@
#include <aim.h>
-static aim_tlv_t *createtlv(void)
-{
- return g_new0(aim_tlv_t, 1);
-}
-
static void freetlv(aim_tlv_t **oldtlv)
{
-
if (!oldtlv || !*oldtlv)
return;
g_free((*oldtlv)->value);
g_free(*oldtlv);
*oldtlv = NULL;
-
- return;
}
/**
@@ -45,33 +37,15 @@ aim_tlvlist_t *aim_readtlvchain(aim_bstream_t *bs)
type = aimbs_get16(bs);
length = aimbs_get16(bs);
-#if 0 /* temporarily disabled until I know if they're still doing it or not */
- /*
- * Okay, so now AOL has decided that any TLV of
- * type 0x0013 can only be two bytes, despite
- * what the actual given length is. So here
- * we dump any invalid TLVs of that sort. Hopefully
- * theres no special cases to this special case.
- * - mid (30jun2000)
- */
- if ((type == 0x0013) && (length != 0x0002))
- length = 0x0002;
-#else
- if (0)
- ;
-#endif
- else {
+ cur = g_new0(aim_tlvlist_t, 1);
- cur = g_new0(aim_tlvlist_t, 1);
+ cur->tlv = g_new0(aim_tlv_t, 1);
+ cur->tlv->type = type;
+ if ((cur->tlv->length = length))
+ cur->tlv->value = aimbs_getraw(bs, length);
- cur->tlv = createtlv();
- cur->tlv->type = type;
- if ((cur->tlv->length = length))
- cur->tlv->value = aimbs_getraw(bs, length);
-
- cur->next = list;
- list = cur;
- }
+ cur->next = list;
+ list = cur;
}
return list;
@@ -172,7 +146,7 @@ int aim_addtlvtochain_raw(aim_tlvlist_t **list, const guint16 t, const guint16 l
if (!(newtlv = g_new0(aim_tlvlist_t, 1)))
return 0;
- if (!(newtlv->tlv = createtlv())) {
+ if (!(newtlv->tlv = g_new0(aim_tlv_t, 1))) {
g_free(newtlv);
return 0;
}