Module: kamailio
Branch: master
Commit: 0b5407ec0f13d7631a5273171338628b44814498
URL:
https://github.com/kamailio/kamailio/commit/0b5407ec0f13d7631a5273171338628…
Author: Olle E. Johansson <oej(a)edvina.net>
Committer: Olle E. Johansson <oej(a)edvina.net>
Date: 2022-01-03T15:41:09+01:00
htable: Add response for rpc flush failed and success states
---
Modified: src/modules/htable/htable.c
---
Diff:
https://github.com/kamailio/kamailio/commit/0b5407ec0f13d7631a5273171338628…
Patch:
https://github.com/kamailio/kamailio/commit/0b5407ec0f13d7631a5273171338628…
---
diff --git a/src/modules/htable/htable.c b/src/modules/htable/htable.c
index 78f151daf3..bd6d474e9d 100644
--- a/src/modules/htable/htable.c
+++ b/src/modules/htable/htable.c
@@ -1809,7 +1809,11 @@ static void htable_rpc_flush(rpc_t* rpc, void* c)
rpc->fault(c, 500, "No such htable");
return;
}
- ht_reset_content(ht);
+ if(ht_reset_content(ht) < 0) {
+ rpc->fault(c, 500, "Htable flush failed.");
+ return;
+ }
+ rpc->rpl_printf(c, "Ok. Htable flushed.");
}
/*! \brief RPC htable.reload command to reload content of a hash table */