[Asterisk-cvs] asterisk/channels chan_agent.c, 1.82, 1.83 chan_alsa.c, 1.27, 1.28 chan_h323.c, 1.76, 1.77 chan_iax2.c, 1.192, 1.193 chan_local.c, 1.33, 1.34 chan_mgcp.c, 1.80, 1.81 chan_modem.c, 1.28, 1.29 chan_nbs.c, 1.10, 1.11 chan_oss.c, 1.34, 1.35 chan_phone.c, 1.34, 1.35 chan_sip.c, 1.514, 1.515 chan_skinny.c, 1.55, 1.56 chan_vpb.c, 1.38, 1.39 chan_zap.c, 1.350, 1.351

markster at lists.digium.com markster at lists.digium.com
Sun Oct 3 00:18:12 CDT 2004


Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv7037/channels

Modified Files:
	chan_agent.c chan_alsa.c chan_h323.c chan_iax2.c chan_local.c 
	chan_mgcp.c chan_modem.c chan_nbs.c chan_oss.c chan_phone.c 
	chan_sip.c chan_skinny.c chan_vpb.c chan_zap.c 
Log Message:
Major PBX revamps (including labels, update examples)


Index: chan_agent.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_agent.c,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -d -r1.82 -r1.83
--- chan_agent.c	2 Oct 2004 00:58:31 -0000	1.82
+++ chan_agent.c	3 Oct 2004 04:19:58 -0000	1.83
@@ -1001,7 +1001,7 @@
 	return res;
 }
 
-static struct ast_channel *agent_request(char *type, int format, void *data)
+static struct ast_channel *agent_request(const char *type, int format, void *data)
 {
 	struct agent_pvt *p;
 	struct ast_channel *chan = NULL;

Index: chan_alsa.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_alsa.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- chan_alsa.c	17 Aug 2004 23:53:15 -0000	1.27
+++ chan_alsa.c	3 Oct 2004 04:19:58 -0000	1.28
@@ -753,7 +753,7 @@
 	return tmp;
 }
 
-static struct ast_channel *alsa_request(char *type, int format, void *data)
+static struct ast_channel *alsa_request(const char *type, int format, void *data)
 {
 	int oldformat = format;
 	struct ast_channel *tmp=NULL;

Index: chan_h323.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_h323.c,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -d -r1.76 -r1.77
--- chan_h323.c	1 Oct 2004 04:50:34 -0000	1.76
+++ chan_h323.c	3 Oct 2004 04:19:58 -0000	1.77
@@ -906,7 +906,7 @@
 	}	
 
 }
-static struct ast_channel *oh323_request(char *type, int format, void *data)
+static struct ast_channel *oh323_request(const char *type, int format, void *data)
 {
 	int oldformat;
 	struct oh323_pvt *p;

Index: chan_iax2.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_iax2.c,v
retrieving revision 1.192
retrieving revision 1.193
diff -u -d -r1.192 -r1.193
--- chan_iax2.c	2 Oct 2004 02:13:04 -0000	1.192
+++ chan_iax2.c	3 Oct 2004 04:19:58 -0000	1.193
@@ -4341,7 +4341,7 @@
 		stringp = multi;
 		while((ext = strsep(&stringp, "&"))) {
 			if (onoff)
-				ast_add_extension(regcontext, 1, ext, 1, NULL, "Noop", strdup(peer->name), free, type);
+				ast_add_extension(regcontext, 1, ext, 1, NULL, NULL, "Noop", strdup(peer->name), free, type);
 			else
 				ast_context_remove_extension(regcontext, ext, 1, NULL);
 		}
@@ -6205,7 +6205,7 @@
 	}
 }
 
-static struct ast_channel *iax2_request(char *type, int format, void *data)
+static struct ast_channel *iax2_request(const char *type, int format, void *data)
 {
 	int callno;
 	int res;
@@ -6993,7 +6993,7 @@
 	return reload_config();
 }
 
-static int cache_get_callno_locked(char *data)
+static int cache_get_callno_locked(const char *data)
 {
 	struct sockaddr_in sin;
 	int x;
@@ -7075,7 +7075,7 @@
 	return callno;
 }
 
-static struct iax2_dpcache *find_cache(struct ast_channel *chan, char *data, char *context, char *exten, int priority)
+static struct iax2_dpcache *find_cache(struct ast_channel *chan, const char *data, const char *context, const char *exten, int priority)
 {
 	struct iax2_dpcache *dp, *prev = NULL, *next;
 	struct timeval tv;
@@ -7225,7 +7225,7 @@
 	return dp;	
 }
 
-static int iax2_exists(struct ast_channel *chan, char *context, char *exten, int priority, char *callerid, char *data)
+static int iax2_exists(struct ast_channel *chan, const char *context, const char *exten, int priority, const char *callerid, const char *data)
 {
 	struct iax2_dpcache *dp;
 	int res = 0;
@@ -7247,7 +7247,7 @@
 	return res;
 }
 
-static int iax2_canmatch(struct ast_channel *chan, char *context, char *exten, int priority, char *callerid, char *data)
+static int iax2_canmatch(struct ast_channel *chan, const char *context, const char *exten, int priority, const char *callerid, const char *data)
 {
 	int res = 0;
 	struct iax2_dpcache *dp;
@@ -7269,7 +7269,7 @@
 	return res;
 }
 
-static int iax2_matchmore(struct ast_channel *chan, char *context, char *exten, int priority, char *callerid, char *data)
+static int iax2_matchmore(struct ast_channel *chan, const char *context, const char *exten, int priority, const char *callerid, const char *data)
 {
 	int res = 0;
 	struct iax2_dpcache *dp;
@@ -7291,7 +7291,7 @@
 	return res;
 }
 
-static int iax2_exec(struct ast_channel *chan, char *context, char *exten, int priority, char *callerid, int newstack, char *data)
+static int iax2_exec(struct ast_channel *chan, const char *context, const char *exten, int priority, const char *callerid, int newstack, const char *data)
 {
 	char odata[256];
 	char req[256];

Index: chan_local.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_local.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- chan_local.c	2 Oct 2004 00:58:31 -0000	1.33
+++ chan_local.c	3 Oct 2004 04:19:58 -0000	1.34
@@ -462,7 +462,7 @@
 }
 
 
-static struct ast_channel *local_request(char *type, int format, void *data)
+static struct ast_channel *local_request(const char *type, int format, void *data)
 {
 	struct local_pvt *p;
 	struct ast_channel *chan = NULL;

Index: chan_mgcp.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_mgcp.c,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -d -r1.80 -r1.81
--- chan_mgcp.c	2 Oct 2004 00:58:31 -0000	1.80
+++ chan_mgcp.c	3 Oct 2004 04:19:58 -0000	1.81
@@ -3345,7 +3345,7 @@
 	return 0;
 }
 
-static struct ast_channel *mgcp_request(char *type, int format, void *data)
+static struct ast_channel *mgcp_request(const char *type, int format, void *data)
 {
 	int oldformat;
 	struct mgcp_subchannel *sub;

Index: chan_modem.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_modem.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- chan_modem.c	2 Oct 2004 00:58:31 -0000	1.28
+++ chan_modem.c	3 Oct 2004 04:19:58 -0000	1.29
@@ -760,7 +760,7 @@
 	return tmp;
 }
 
-static struct ast_channel *modem_request(char *type, int format, void *data)
+static struct ast_channel *modem_request(const char *type, int format, void *data)
 {
 	int oldformat;
 	struct ast_modem_pvt *p;

Index: chan_nbs.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_nbs.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- chan_nbs.c	16 Jul 2004 04:40:54 -0000	1.10
+++ chan_nbs.c	3 Oct 2004 04:19:58 -0000	1.11
@@ -232,7 +232,7 @@
 }
 
 
-static struct ast_channel *nbs_request(char *type, int format, void *data)
+static struct ast_channel *nbs_request(const char *type, int format, void *data)
 {
 	int oldformat;
 	struct nbs_pvt *p;

Index: chan_oss.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_oss.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- chan_oss.c	2 Oct 2004 00:58:31 -0000	1.34
+++ chan_oss.c	3 Oct 2004 04:19:58 -0000	1.35
@@ -745,7 +745,7 @@
 	return tmp;
 }
 
-static struct ast_channel *oss_request(char *type, int format, void *data)
+static struct ast_channel *oss_request(const char *type, int format, void *data)
 {
 	int oldformat = format;
 	struct ast_channel *tmp;

Index: chan_phone.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_phone.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- chan_phone.c	2 Oct 2004 00:58:31 -0000	1.34
+++ chan_phone.c	3 Oct 2004 04:19:58 -0000	1.35
@@ -1023,7 +1023,7 @@
 	return tmp;
 }
 
-static struct ast_channel *phone_request(char *type, int format, void *data)
+static struct ast_channel *phone_request(const char *type, int format, void *data)
 {
 	int oldformat;
 	struct phone_pvt *p;

Index: chan_sip.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v
retrieving revision 1.514
retrieving revision 1.515
diff -u -d -r1.514 -r1.515
--- chan_sip.c	2 Oct 2004 02:31:36 -0000	1.514
+++ chan_sip.c	3 Oct 2004 04:19:58 -0000	1.515
@@ -4293,7 +4293,7 @@
 		stringp = multi;
 		while((ext = strsep(&stringp, "&"))) {
 			if (onoff)
-				ast_add_extension(regcontext, 1, ext, 1, NULL, "Noop", strdup(peer->name), free, type);
+				ast_add_extension(regcontext, 1, ext, 1, NULL, NULL, "Noop", strdup(peer->name), free, type);
 			else
 				ast_context_remove_extension(regcontext, ext, 1, NULL);
 		}
@@ -7966,7 +7966,7 @@
 
 /*--- sip_request: PBX interface function -build SIP pvt structure ---*/
 /* SIP calls initiated by the PBX arrive here */
-static struct ast_channel *sip_request(char *type, int format, void *data)
+static struct ast_channel *sip_request(const char *type, int format, void *data)
 {
 	int oldformat;
 	struct sip_pvt *p;

Index: chan_skinny.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_skinny.c,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -d -r1.55 -r1.56
--- chan_skinny.c	2 Oct 2004 00:58:31 -0000	1.55
+++ chan_skinny.c	3 Oct 2004 04:19:58 -0000	1.56
@@ -2489,7 +2489,7 @@
 	return 0;
 }
 
-static struct ast_channel *skinny_request(char *type, int format, void *data)
+static struct ast_channel *skinny_request(const char *type, int format, void *data)
 {
 	int oldformat;
 	struct skinny_subchannel *sub;

Index: chan_vpb.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_vpb.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- chan_vpb.c	17 Sep 2004 00:34:51 -0000	1.38
+++ chan_vpb.c	3 Oct 2004 04:19:58 -0000	1.39
@@ -2032,7 +2032,7 @@
 	return tmp;
 }
 
-static struct ast_channel *vpb_request(char *type, int format, void *data) 
+static struct ast_channel *vpb_request(const char *type, int format, void *data) 
 {
 	int oldformat;
 	struct vpb_pvt *p;

Index: chan_zap.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_zap.c,v
retrieving revision 1.350
retrieving revision 1.351
diff -u -d -r1.350 -r1.351
--- chan_zap.c	2 Oct 2004 17:16:36 -0000	1.350
+++ chan_zap.c	3 Oct 2004 04:19:58 -0000	1.351
@@ -114,7 +114,6 @@
 ;
 
 static char *type = "Zap";
-static char *typecompat = "Tor";	/* Retain compatibility with chan_tor */
 static char *config = "zapata.conf";
 
 #define SIG_EM		ZT_SIG_EM
@@ -6730,7 +6729,7 @@
 }
 #endif
 
-static struct ast_channel *zt_request(char *type, int format, void *data)
+static struct ast_channel *zt_request(const char *type, int format, void *data)
 {
 	int oldformat;
 	int groupmatch = 0;
@@ -8882,7 +8881,6 @@
 	ast_manager_unregister( "ZapDNDon" );
 	ast_manager_unregister("ZapShowChannels");
 	ast_unregister_application(app_callingpres);
-	ast_channel_unregister(typecompat);
 	ast_channel_unregister(type);
 	if (!ast_mutex_lock(&iflock)) {
 		/* Hangup all interfaces if they have an owner */
@@ -9686,11 +9684,6 @@
 		__unload_module();
 		return -1;
 	}
-	if (ast_channel_register(typecompat, tdesc, AST_FORMAT_SLINEAR |  AST_FORMAT_ULAW, zt_request)) {
-		ast_log(LOG_ERROR, "Unable to register channel class %s\n", typecompat);
-		__unload_module();
-		return -1;
-	}
 #ifdef ZAPATA_PRI
 	ast_cli_register(&pri_debug);
 	ast_cli_register(&pri_no_debug);




More information about the svn-commits mailing list