- if((tlv = aim_gettlv(tlvlist, 0x0001, 1))) {
- modname = malloc(tlv->length + 5);
- memset(modname, 0, tlv->length + 5);
- memcpy(modname, tlv->value, tlv->length);
- strncat(modname, ".ocm", tlv->length + 5 - strlen(modname));
- } else {
- modname = "aim.exe";
- }
- } else
- modname = "aim.exe";
-
- faimdprintf(sess, 1, "data at 0x%08lx (%d bytes) of %s requested\n", offset, len, modname);
+ if (aim_gettlv(list, 0x0001, 1))
+ modname = aim_gettlv_str(list, 0x0001, 1);
+
+ faimdprintf(sess, 1, "data at 0x%08lx (%d bytes) of requested\n", offset, len, modname?modname:"aim.exe");