Prevent CDR backends from unregistering while billing data is in flight

This patch makes it so that CDR backends cannot be unregistered while active
CDR records exist. This helps to prevent billing data from being lost during
restarts and shutdowns.

Review: https://reviewboard.asterisk.org/r/2880/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@402081 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Matthew Jordan
2013-10-27 19:40:43 +00:00
parent 23be89dfff
commit 5740a2bda6
15 changed files with 155 additions and 36 deletions

View File

@@ -503,8 +503,27 @@ int ast_cdr_register(const char *name, const char *desc, ast_cdrbe be);
* \brief Unregister a CDR handling engine
* \param name name of CDR handler to unregister
* Unregisters a CDR by it's name
*
* \retval 0 The backend unregistered successfully
* \retval -1 The backend could not be unregistered at this time
*/
void ast_cdr_unregister(const char *name);
int ast_cdr_unregister(const char *name);
/*!
* \brief Suspend a CDR backend temporarily
*
* \retval 0 The backend is suspdended
* \retval -1 The backend could not be suspended
*/
int ast_cdr_backend_suspend(const char *name);
/*!
* \brief Unsuspend a CDR backend
*
* \retval 0 The backend was unsuspended
* \retval -1 The back could not be unsuspended
*/
int ast_cdr_backend_unsuspend(const char *name);
/*!
* \brief Disposition to a string