[asterisk-commits] mmichelson: branch group/CCSS r235567 - in /team/group/CCSS: channels/ includ...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Dec 18 13:08:46 CST 2009


Author: mmichelson
Date: Fri Dec 18 13:08:44 2009
New Revision: 235567

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=235567
Log:
Turn the callback called from ast_cc_callback into a typedef


Modified:
    team/group/CCSS/channels/chan_dahdi.c
    team/group/CCSS/include/asterisk/ccss.h
    team/group/CCSS/include/asterisk/channel.h
    team/group/CCSS/main/ccss.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=235567&r1=235566&r2=235567
==============================================================================
--- team/group/CCSS/channels/chan_dahdi.c (original)
+++ team/group/CCSS/channels/chan_dahdi.c Fri Dec 18 13:08:44 2009
@@ -1430,8 +1430,7 @@
 static int dahdi_queryoption(struct ast_channel *chan, int option, void *data, int *datalen);
 static int dahdi_func_read(struct ast_channel *chan, const char *function, char *data, char *buf, size_t len);
 static int dahdi_func_write(struct ast_channel *chan, const char *function, char *data, const char *value);
-static int dahdi_cc_callback(struct ast_channel *inbound, const char *dest, 
-		void (*callback)(struct ast_channel *inbound, struct ast_cc_config_params *cc_params, const char * const interface_name));
+static int dahdi_cc_callback(struct ast_channel *inbound, const char *dest, ast_cc_callback_fn callback);
 
 static const struct ast_channel_tech dahdi_tech = {
 	.type = "DAHDI",
@@ -12276,8 +12275,7 @@
 	return tmp;
 }
 
-static int dahdi_cc_callback(struct ast_channel *inbound, const char *dest, 
-		void (*callback)(struct ast_channel *inbound, struct ast_cc_config_params *cc_params, const char * const interface_name))
+static int dahdi_cc_callback(struct ast_channel *inbound, const char *dest, ast_cc_callback_fn callback)
 {
 	struct dahdi_pvt *p, *exitpvt;
 	ast_group_t groupmatch = 0;

Modified: team/group/CCSS/include/asterisk/ccss.h
URL: http://svnview.digium.com/svn/asterisk/team/group/CCSS/include/asterisk/ccss.h?view=diff&rev=235567&r1=235566&r2=235567
==============================================================================
--- team/group/CCSS/include/asterisk/ccss.h (original)
+++ team/group/CCSS/include/asterisk/ccss.h Fri Dec 18 13:08:44 2009
@@ -1198,6 +1198,8 @@
  */
 int ast_cc_build_frame(struct ast_channel *chan, struct ast_cc_config_params *cc_params, const char * const interface_name, enum ast_cc_service_type service, struct ast_frame *frame);
 
+typedef void (*ast_cc_callback_fn)(struct ast_channel *chan, struct ast_cc_config_params *cc_params, const char * const interface_name);
+
 /*!
  * \since 1.6.4
  * \brief Run a callback for potential matching destinations.
@@ -1210,8 +1212,7 @@
  * \param callback Function to call when a target is reached
  * \retval Always 0, I guess.
  */
-int ast_cc_callback(struct ast_channel *inbound, const char * const tech, const char * const dest, 
-		void (*callback)(struct ast_channel *inbound, struct ast_cc_config_params *cc_params, const char * const interace_name));
+int ast_cc_callback(struct ast_channel *inbound, const char * const tech, const char * const dest, ast_cc_callback_fn callback);
 
 /*!
  * \since 1.6.4

Modified: team/group/CCSS/include/asterisk/channel.h
URL: http://svnview.digium.com/svn/asterisk/team/group/CCSS/include/asterisk/channel.h?view=diff&rev=235567&r1=235566&r2=235567
==============================================================================
--- team/group/CCSS/include/asterisk/channel.h (original)
+++ team/group/CCSS/include/asterisk/channel.h Fri Dec 18 13:08:44 2009
@@ -536,8 +536,7 @@
 	 * match the input and return call the designated callback with the device's call completion
 	 * parameters as a parameter.
 	 */
-	int (* cc_callback)(struct ast_channel *inbound, const char *dest,
-			void (*callback_fn)(struct ast_channel *inbound, struct ast_cc_config_params *cc_params, const char * const interface_name));
+	int (* cc_callback)(struct ast_channel *inbound, const char *dest, ast_cc_callback_fn callback);
 };
 
 struct ast_epoll_data;

Modified: team/group/CCSS/main/ccss.c
URL: http://svnview.digium.com/svn/asterisk/team/group/CCSS/main/ccss.c?view=diff&rev=235567&r1=235566&r2=235567
==============================================================================
--- team/group/CCSS/main/ccss.c (original)
+++ team/group/CCSS/main/ccss.c Fri Dec 18 13:08:44 2009
@@ -3290,8 +3290,7 @@
 	ast_handle_cc_control_frame(inbound, NULL, &payload);
 }
 
-int ast_cc_callback(struct ast_channel *inbound, const char * const tech, const char * const dest,
-		void (*callback)(struct ast_channel *inbound, struct ast_cc_config_params *cc_params, const char * const interface_name))
+int ast_cc_callback(struct ast_channel *inbound, const char * const tech, const char * const dest, ast_cc_callback_fn callback)
 {
 	const struct ast_channel_tech *chantech = ast_get_channel_tech(tech);
 




More information about the asterisk-commits mailing list