mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-31 10:47:18 +00:00 
			
		
		
		
	Fix bugs in voicemail APIs and add unit tests.
There were several crashes that could occur due to NULL inputs, invalid inputs, and the like. This fixes all known ones and adds unit tests to exercise the APIs. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8-digiumphones@361704 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
		| @@ -190,4 +190,25 @@ int ast_vm_msg_play(struct ast_channel *chan, | ||||
|  * \retval other The name of the mailbox | ||||
|  */ | ||||
| const char *ast_vm_index_to_foldername(unsigned int index); | ||||
|  | ||||
| #ifdef TEST_FRAMEWORK | ||||
| /*! | ||||
|  * \brief Add a user to the voicemail system for test purposes | ||||
|  * \param context The context of the mailbox | ||||
|  * \param mailbox The mailbox for the user | ||||
|  * \retval 0 success | ||||
|  * \retval other failure | ||||
|  */ | ||||
| int ast_vm_test_create_user(const char *context, const char *mailbox); | ||||
|  | ||||
| /*! | ||||
|  * \brief Dispose of a user.  This should be used to destroy a user that was | ||||
|  * previously created using ast_vm_test_create_user | ||||
|  * \param context The context of the mailbox | ||||
|  * \param mailbox The mailbox for the user to destroy | ||||
|  */ | ||||
| int ast_vm_test_destroy_user(const char *context, const char *mailbox); | ||||
|  | ||||
| #endif | ||||
|  | ||||
| #endif | ||||
|   | ||||
		Reference in New Issue
	
	Block a user