- /*
- * However, in this command, there's usually more TLVs following...
- */
- tlvlist = aim_readtlvchain(command->data+i, command->commandlen-i);
- prof_encoding = aim_gettlv_str(tlvlist, 0x0001, 1);
- prof = aim_gettlv_str(tlvlist, 0x0002, 1);
+ /*
+ * However, in this command, there's usually more TLVs following...
+ */
+ tlvlist = aim_readtlvchain(command->data+i, command->commandlen-i);
+
+ /*
+ * Depending on what informational text was requested, different
+ * TLVs will appear here.
+ *
+ * Profile will be 1 and 2, away message will be 3 and 4.
+ */
+ if (aim_gettlv(tlvlist, 0x0001, 1)) {
+ text_encoding = aim_gettlv_str(tlvlist, 0x0001, 1);
+ text = aim_gettlv_str(tlvlist, 0x0002, 1);
+ } else if (aim_gettlv(tlvlist, 0x0003, 1)) {
+ text_encoding = aim_gettlv_str(tlvlist, 0x0003, 1);
+ text = aim_gettlv_str(tlvlist, 0x0004, 1);
+ }