[asterisk-commits] mmichelson: branch group/CCSS r214362 - in /team/group/CCSS: include/asterisk...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Aug 27 11:16:05 CDT 2009
Author: mmichelson
Date: Thu Aug 27 11:16:02 2009
New Revision: 214362
URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=214362
Log:
Add config parameters to agent.
Modified:
team/group/CCSS/include/asterisk/ccss.h
team/group/CCSS/main/ccss.c
Modified: team/group/CCSS/include/asterisk/ccss.h
URL: http://svn.asterisk.org/svn-view/asterisk/team/group/CCSS/include/asterisk/ccss.h?view=diff&rev=214362&r1=214361&r2=214362
==============================================================================
--- team/group/CCSS/include/asterisk/ccss.h (original)
+++ team/group/CCSS/include/asterisk/ccss.h Thu Aug 27 11:16:02 2009
@@ -548,14 +548,21 @@
};
struct ast_cc_agent {
- /*! Which instance of the core state machine does this
+ /*!
+ * Which instance of the core state machine does this
* agent pertain to?
*/
unsigned int core_id;
- /*! Callback functions needed for specific agent
+ /*!
+ * Callback functions needed for specific agent
* implementations
*/
const struct ast_cc_agent_callbacks *callbacks;
+ /*!
+ * Configuration parameters that affect this
+ * agent's operation.
+ */
+ const struct ast_cc_config_params *cc_params;
/*! Data specific to agent implementation */
void *private_data;
};
Modified: team/group/CCSS/main/ccss.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/group/CCSS/main/ccss.c?view=diff&rev=214362&r1=214361&r2=214362
==============================================================================
--- team/group/CCSS/main/ccss.c (original)
+++ team/group/CCSS/main/ccss.c Thu Aug 27 11:16:02 2009
@@ -545,7 +545,13 @@
*/
agent->callbacks = &generic_agent_callbacks;
check_callback_sanity(agent->callbacks);
+ if (!(agent->cc_params = ast_cc_config_params_init())) {
+ ast_free(agent);
+ return NULL;
+ }
+ ast_cc_copy_config_params(agent->cc_params, ast_channel_get_cc_config_params(caller_chan));
if (!(agent->private_data = agent->callbacks->init(agent, caller_chan))) {
+ ast_cc_config_params_destroy(agent->cc_params);
ast_free(agent);
return NULL;
}
More information about the asterisk-commits
mailing list