[asterisk-commits] file: trunk r45105 - in /trunk: ./
res/res_speech.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Fri Oct 13 14:03:06 MST 2006
Author: file
Date: Fri Oct 13 16:03:05 2006
New Revision: 45105
URL: http://svn.digium.com/view/asterisk?rev=45105&view=rev
Log:
Merged revisions 45104 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r45104 | file | 2006-10-13 17:01:13 -0400 (Fri, 13 Oct 2006) | 2 lines
Check return value from engine in case of failure (ie: out of licenses) (reported on -dev mailing list)
........
Modified:
trunk/ (props changed)
trunk/res/res_speech.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Modified: trunk/res/res_speech.c
URL: http://svn.digium.com/view/asterisk/trunk/res/res_speech.c?rev=45105&r1=45104&r2=45105&view=diff
==============================================================================
--- trunk/res/res_speech.c (original)
+++ trunk/res/res_speech.c Fri Oct 13 16:03:05 2006
@@ -235,8 +235,12 @@
/* We are not ready to accept audio yet */
ast_speech_change_state(new_speech, AST_SPEECH_STATE_NOT_READY);
- /* Pass ourselves to the engine so they can set us up some more */
- engine->new(new_speech);
+ /* Pass ourselves to the engine so they can set us up some more and if they error out then do not create a structure */
+ if (engine->new(new_speech)) {
+ ast_mutex_destroy(&new_speech->lock);
+ free(new_speech);
+ new_speech = NULL;
+ }
return new_speech;
}
More information about the asterisk-commits
mailing list