*/
bool is_request;
+ /**
+ * Sorting of message disabled?
+ */
+ bool sort_disabled;
+
/**
* Message ID of this message.
*/
return encryption;
}
+METHOD(message_t, disable_sort, void,
+ private_message_t *this)
+{
+ this->sort_disabled = TRUE;
+}
+
METHOD(message_t, generate, status_t,
private_message_t *this, aead_t *aead, packet_t **packet)
{
return NOT_SUPPORTED;
}
- order_payloads(this);
+ if (!this->sort_disabled)
+ {
+ order_payloads(this);
+ }
DBG1(DBG_ENC, "generating %s", get_string(this, str, sizeof(str)));
.get_request = _get_request,
.add_payload = _add_payload,
.add_notify = _add_notify,
+ .disable_sort = _disable_sort,
.generate = _generate,
.set_source = _set_source,
.get_source = _get_source,
void (*add_notify) (message_t *this, bool flush, notify_type_t type,
chunk_t data);
+ /**
+ * Disable automatic payload sorting for this message.
+ */
+ void (*disable_sort)(message_t *this);
+
/**
* Parses header of message.
*