[svn-commits] file: trunk r178764 - /trunk/main/indications.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Feb 26 09:40:34 CST 2009


Author: file
Date: Thu Feb 26 09:40:10 2009
New Revision: 178764

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=178764
Log:
Ensure there is a valid tone part before trying to play tones.

(closes issue #14558)
Reported by: alecdavis

Modified:
    trunk/main/indications.c

Modified: trunk/main/indications.c
URL: http://svn.digium.com/svn-view/asterisk/trunk/main/indications.c?view=diff&rev=178764&r1=178763&r2=178764
==============================================================================
--- trunk/main/indications.c (original)
+++ trunk/main/indications.c Thu Feb 26 09:40:10 2009
@@ -374,6 +374,11 @@
 		d.nitems++;
 	}
 
+	if (!d.nitems) {
+		ast_log(LOG_ERROR, "No valid tone parts\n");
+		return -1;
+	}
+
 	if (ast_activate_generator(chan, &playtones, &d)) {
 		ast_free(d.items);
 		return -1;




More information about the svn-commits mailing list