[asterisk-commits] mmichelson: branch group/CCSS r218095 - /team/group/CCSS/main/ccss.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Sep 11 13:26:55 CDT 2009


Author: mmichelson
Date: Fri Sep 11 13:26:51 2009
New Revision: 218095

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=218095
Log:
Handle the case where ast_request_and_dial fails for a recall.


Modified:
    team/group/CCSS/main/ccss.c

Modified: team/group/CCSS/main/ccss.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/group/CCSS/main/ccss.c?view=diff&rev=218095&r1=218094&r2=218095
==============================================================================
--- team/group/CCSS/main/ccss.c (original)
+++ team/group/CCSS/main/ccss.c Fri Sep 11 13:26:51 2009
@@ -780,7 +780,13 @@
 	if ((target = strchr(interface, '/'))) {
 		*target++ = '\0';
 	}
-	chan = ast_request_and_dial(tech, AST_FORMAT_SLINEAR, NULL, target, 20000, &reason, NULL, NULL);
+	if (!(chan = ast_request_and_dial(tech, AST_FORMAT_SLINEAR, NULL, target, 20000, &reason, NULL, NULL))) {
+		/* Hmm, no channel. Sucks for you, bud.
+		 */
+		ast_log(LOG_NOTICE, "Failed to call back %s for reason %d\n", agent->interface, reason);
+		ast_cc_request_state_change(CC_FAILED, agent->core_id, "Failed to call back interface\n");
+		return NULL;
+	}
 	/* We have a channel. It's time now to set up the datastore of recalled CC interfaces.
 	 * This will be a common task for all recall functions. If it were possible, I'd have
 	 * the core do it automatically, but alas I cannot. Instead, I will provide a public




More information about the asterisk-commits mailing list