- /* bytes 7 and on: raw: SNAC data */ /* XXX: ye gods! get rid of this! */
- memcpy(&(curPacket[6]), cur->data, cur->commandlen);
-
- /* full image of raw packet data now in curPacket */
+ /* bytes 7 and on: raw: SNAC data */ /* XXX: ye gods! get rid of this! */
+ memcpy(&(curPacket[6]), cur->data, cur->commandlen);
+
+ } else if (cur->hdrtype == AIM_FRAMETYPE_OFT) {
+ int z = 0;
+
+ z += aimutil_put8(curPacket+z, cur->hdr.oft.magic[0]);
+ z += aimutil_put8(curPacket+z, cur->hdr.oft.magic[1]);
+ z += aimutil_put8(curPacket+z, cur->hdr.oft.magic[2]);
+ z += aimutil_put8(curPacket+z, cur->hdr.oft.magic[3]);
+
+ z += aimutil_put16(curPacket+z, cur->hdr.oft.hdr2len + 8);
+ z += aimutil_put16(curPacket+z, cur->hdr.oft.type);
+
+ memcpy(curPacket+z, cur->hdr.oft.hdr2, cur->hdr.oft.hdr2len);
+ }
+
+ /*
+ * For OSCAR, a full image of the raw packet data now in curPacket.
+ * For OFT, an image of just the bloated header is in curPacket,
+ * since OFT allows us to do the data in a different write (yay!).
+ */