[asterisk-commits] dvossel: branch dvossel/fixtheworld_phase1_step3 r300565 - /team/dvossel/fixt...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Jan 4 23:21:18 UTC 2011
Author: dvossel
Date: Tue Jan 4 17:21:14 2011
New Revision: 300565
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=300565
Log:
all the changes required to get ccss.c to compile with ast_format conversion
Modified:
team/dvossel/fixtheworld_phase1_step3/main/ccss.c
Modified: team/dvossel/fixtheworld_phase1_step3/main/ccss.c
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/fixtheworld_phase1_step3/main/ccss.c?view=diff&rev=300565&r1=300564&r2=300565
==============================================================================
--- team/dvossel/fixtheworld_phase1_step3/main/ccss.c (original)
+++ team/dvossel/fixtheworld_phase1_step3/main/ccss.c Tue Jan 4 17:21:14 2011
@@ -2482,19 +2482,30 @@
struct ast_channel *chan;
const char *callback_macro = ast_get_cc_callback_macro(agent->cc_params);
unsigned int recall_timer = ast_get_cc_recall_timer(agent->cc_params) * 1000;
+ struct ast_format tmp_fmt;
+ struct ast_cap *tmp_cap = ast_cap_alloc();
+
+ if (!tmp_cap) {
+ return NULL;
+ }
tech = interface;
if ((target = strchr(interface, '/'))) {
*target++ = '\0';
}
- if (!(chan = ast_request_and_dial(tech, AST_FORMAT_SLINEAR, NULL, target, recall_timer, &reason, generic_pvt->cid_num, generic_pvt->cid_name))) {
+
+ ast_cap_add(tmp_cap, ast_format_set(&tmp_fmt, AST_FORMAT_SLINEAR, 0));
+ if (!(chan = ast_request_and_dial(tech, tmp_cap, NULL, target, recall_timer, &reason, generic_pvt->cid_num, generic_pvt->cid_name))) {
/* Hmm, no channel. Sucks for you, bud.
*/
ast_log_dynamic_level(cc_logger_level, "Core %d: Failed to call back %s for reason %d\n",
agent->core_id, agent->device_name, reason);
ast_cc_failed(agent->core_id, "Failed to call back device %s/%s", tech, target);
+ ast_cap_destroy(tmp_cap);
return NULL;
}
+ ast_cap_destroy(tmp_cap);
+
if (!ast_strlen_zero(callback_macro)) {
ast_log_dynamic_level(cc_logger_level, "Core %d: There's a callback macro configured for agent %s\n",
agent->core_id, agent->device_name);
More information about the asterisk-commits
mailing list