[asterisk-commits] rmudgett: branch group/CCSS r244034 - /team/group/CCSS/channels/chan_dahdi.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Jan 28 18:45:00 CST 2010
Author: rmudgett
Date: Thu Jan 28 18:44:56 2010
New Revision: 244034
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=244034
Log:
Check the return value of determine_starting_point(). Found when backporting to C.3.
Modified:
team/group/CCSS/channels/chan_dahdi.c
Modified: team/group/CCSS/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/team/group/CCSS/channels/chan_dahdi.c?view=diff&rev=244034&r1=244033&r2=244034
==============================================================================
--- team/group/CCSS/channels/chan_dahdi.c (original)
+++ team/group/CCSS/channels/chan_dahdi.c Thu Jan 28 18:44:56 2010
@@ -12391,6 +12391,11 @@
struct dahdi_starting_point start;
p = determine_starting_point(data, &start);
+ if (!p) {
+ /* We couldn't determine a starting point, which likely means badly-formatted channel name. Abort! */
+ return NULL;
+ }
+
/* Search for an unowned channel */
exitpvt = p;
ast_mutex_lock(&iflock);
@@ -12511,7 +12516,8 @@
* Essentially, for each channel that could have taken the call, indicate that
* it is busy.
*
- * \return Nothing
+ * \retval 0 on success.
+ * \retval -1 on error.
*/
static int dahdi_cc_callback(struct ast_channel *inbound, const char *dest, ast_cc_callback_fn callback)
{
@@ -12522,6 +12528,9 @@
int channelmatched = 0;
p = determine_starting_point(dest, &start);
+ if (!p) {
+ return -1;
+ }
ast_mutex_lock(&iflock);
exitpvt = p;
for (;;) {
More information about the asterisk-commits
mailing list