TLV the 0×0013th

February 23, 2006 on 8:49 pm | In Bugs |

A little while ago I had a problem — I wasn’t receiving any messages on AIM. At least, I wasn’t receiving any messages from my friends; the moviefone and shoppingbuddy bots were working fine. At first I thought I was just a pariah, but I realized that I had a real problem when the problem continued on Monday the 13th. I turns out that DAIM was throwing exceptions while parsing the messages. The problem turned out to be TLV chain 0×0013:

/*
 * Possessed TLV type, type 0x0013.
 *
 * A TLV of type 0x0013 can only be 2 bytes, despite its
 * server-specified length. I have never seen this in action, but
 * having this here hasn't ever broken anything.
 */
if (type == TLVType.AIM_TLV_ATH_REGISTRATION_STATUS && length != 2) {
    len = 2;
}

Apparently this idiosyncrasy was fixed, as this TLV chain is now confirming to the server-specified length. Messages from the bots don’t have this TLV chain, so they worked. This made things easier to debug, as I was able to compare the DAIM hex dumps and identify the problem. I’ve patched daim.jar, and will be releasing this patch soon.

While debugging this issue, I contacted the developer of the DAIM API, David Walluck. I’m going to try to join the DAIM project as a developer since David is busy with grad school and looking for someone to take over the project.

This issue underscores an important point — neither API propagates exceptions up to the application. This is a flaw that is going to have to be fixed before Yafumato can move out of the alpha stage.

1 Comment »

RSS feed for comments on this post. TrackBack URI

  1. […] I have released Yafumato 0.5.1 to fix the aforementioned problem with AIM/OSCAR and TLV chain 0×0013. […]

    Pingback by Yafumato Development Log » Yafumato 0.5.1 — March 7, 2009 #

Leave a comment

XHTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>

Powered by WordPress with Pool theme design by Borja Fernandez.
Entries and comments feeds. Valid XHTML and CSS. ^Top^