mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-11 12:07:06 +00:00
FS-9775: Added support for removing finished transactions via latent purging while expiring
Also added support to send error message responses and updated the test to confirm, errors still need to be updated to send an error responses
This commit is contained in:
1 parent
f95ca83b06
commit
7ac7a7e75b
6 files changed
+290
-47
No files matched your search
@@ -207,6 +207,33 @@ KS_DECLARE(ks_status_t) ks_dht2_message_response(ks_dht2_message_t *message,
|
||||
return KS_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
KS_DECLARE(ks_status_t) ks_dht2_message_error(ks_dht2_message_t *message,
|
||||
uint8_t *transactionid,
|
||||
ks_size_t transactionid_length,
|
||||
struct bencode **args)
|
||||
{
|
||||
struct bencode *e;
|
||||
|
||||
ks_assert(message);
|
||||
ks_assert(transactionid);
|
||||
|
||||
ben_dict_set(message->data, ben_blob("t", 1), ben_blob(transactionid, transactionid_length));
|
||||
ben_dict_set(message->data, ben_blob("y", 1), ben_blob("e", 1));
|
||||
|
||||
// @note r joins message->data and will be freed with it
|
||||
e = ben_list();
|
||||
ben_dict_set(message->data, ben_blob("e", 1), e);
|
||||
|
||||
if (args) {
|
||||
*args = e;
|
||||
}
|
||||
|
||||
return KS_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/* For Emacs:
|
||||
* Local Variables:
|
||||
|
||||
Reference in new issue
Block a user