[asterisk-commits] mmichelson: branch mmichelson/zap_and_dahdi_trunk r134048 - in /team/mmichels...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jul 28 10:33:21 CDT 2008


Author: mmichelson
Date: Mon Jul 28 10:33:21 2008
New Revision: 134048

URL: http://svn.digium.com/view/asterisk?view=rev&rev=134048
Log:
After discussing this more, the goal behind this
branch pretty much turned a 180. This commit
is the first (and maybe only) commit that will
occur. The idea is to remove concessions from 1.4
which allowed for "Zap" to be used in addition to
"DAHDI."

Since 1.6.0 and trunk do not support Zaptel at
all, it seems a bit odd to allow the "Zap" 
syntax in manager commands, CLI commands, etc.

This commit comes from a couple of greps for
dahdi_chan_name and "ZAP"


Modified:
    team/mmichelson/zap_and_dahdi_trunk/apps/app_chanspy.c
    team/mmichelson/zap_and_dahdi_trunk/apps/app_dahdiscan.c
    team/mmichelson/zap_and_dahdi_trunk/apps/app_meetme.c
    team/mmichelson/zap_and_dahdi_trunk/main/asterisk.c

Modified: team/mmichelson/zap_and_dahdi_trunk/apps/app_chanspy.c
URL: http://svn.digium.com/view/asterisk/team/mmichelson/zap_and_dahdi_trunk/apps/app_chanspy.c?view=diff&rev=134048&r1=134047&r2=134048
==============================================================================
--- team/mmichelson/zap_and_dahdi_trunk/apps/app_chanspy.c (original)
+++ team/mmichelson/zap_and_dahdi_trunk/apps/app_chanspy.c Mon Jul 28 10:33:21 2008
@@ -219,13 +219,6 @@
 });
 
 static int next_unique_id_to_use = 0;
-static int PSEUDO_CHAN_LEN;
-
-static void determine_pseudo_chan_len(void) 
-{
-	PSEUDO_CHAN_LEN = dahdi_chan_name_len + strlen("/pseudo");
-}
-
 
 struct chanspy_translation_helper {
 	/* spy data */
@@ -602,7 +595,7 @@
 	const char *exten, const char *context, struct chanspy_ds *chanspy_ds)
 {
 	struct ast_channel *next;
-	char channel_name[AST_CHANNEL_NAME];
+	const size_t pseudo_len = strlen("DAHDI/pseudo");
 
 redo:
 	if (!ast_strlen_zero(spec))
@@ -615,8 +608,7 @@
 	if (!next)
 		return NULL;
 
-	snprintf(channel_name, AST_CHANNEL_NAME, "%s/pseudo", dahdi_chan_name);
-	if (!strncmp(next->name, channel_name, PSEUDO_CHAN_LEN)) {
+	if (!strncmp(next->name, "DAHDI/pseudo", pseudo_len)) {
 		last = next;
 		ast_channel_unlock(next);
 		goto redo;
@@ -1109,7 +1101,6 @@
 {
 	int res = 0;
 
-	determine_pseudo_chan_len();
 	res |= ast_register_application(app_chan, chanspy_exec, tdesc, desc_chan);
 	res |= ast_register_application(app_ext, extenspy_exec, tdesc, desc_ext);
 

Modified: team/mmichelson/zap_and_dahdi_trunk/apps/app_dahdiscan.c
URL: http://svn.digium.com/view/asterisk/team/mmichelson/zap_and_dahdi_trunk/apps/app_dahdiscan.c?view=diff&rev=134048&r1=134047&r2=134048
==============================================================================
--- team/mmichelson/zap_and_dahdi_trunk/apps/app_dahdiscan.c (original)
+++ team/mmichelson/zap_and_dahdi_trunk/apps/app_dahdiscan.c Mon Jul 28 10:33:21 2008
@@ -68,7 +68,7 @@
 static struct ast_channel *get_dahdi_channel_locked(int num) {
 	char name[80];
 	
-	snprintf(name, sizeof(name), "%s/%d-1", dahdi_chan_name, num);
+	snprintf(name, sizeof(name), "DAHDI/%d-1", num);
 	return ast_get_channel_by_name_locked(name);
 }
 

Modified: team/mmichelson/zap_and_dahdi_trunk/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/team/mmichelson/zap_and_dahdi_trunk/apps/app_meetme.c?view=diff&rev=134048&r1=134047&r2=134048
==============================================================================
--- team/mmichelson/zap_and_dahdi_trunk/apps/app_meetme.c (original)
+++ team/mmichelson/zap_and_dahdi_trunk/apps/app_meetme.c Mon Jul 28 10:33:21 2008
@@ -1927,7 +1927,7 @@
 		ast_mutex_unlock(&conf->playlock);
 		goto outrun;
 	}
-	ast_debug(1, "Placed channel %s in ZAP conf %d\n", chan->name, conf->dahdiconf);
+	ast_debug(1, "Placed channel %s in DAHDI conf %d\n", chan->name, conf->dahdiconf);
 
 	if (!sent_event) {
 		manager_event(EVENT_FLAG_CALL, "MeetmeJoin", 

Modified: team/mmichelson/zap_and_dahdi_trunk/main/asterisk.c
URL: http://svn.digium.com/view/asterisk/team/mmichelson/zap_and_dahdi_trunk/main/asterisk.c?view=diff&rev=134048&r1=134047&r2=134048
==============================================================================
--- team/mmichelson/zap_and_dahdi_trunk/main/asterisk.c (original)
+++ team/mmichelson/zap_and_dahdi_trunk/main/asterisk.c Mon Jul 28 10:33:21 2008
@@ -158,8 +158,6 @@
 #if defined(HAVE_SYSINFO)
 long option_minmemfree;				/*!< Minimum amount of free system memory - stop accepting calls if free memory falls below this watermark */
 #endif
-char dahdi_chan_name[AST_CHANNEL_NAME] = "ZAP";
-int dahdi_chan_name_len = 3;
 
 /*! @} */
 
@@ -2786,11 +2784,6 @@
 				option_minmemfree = 0;
 			}
 #endif
-		} else if (!strcasecmp(v->name, "dahdichanname")) {
-			if (!strcasecmp(v->value, "yes")) {
-				ast_copy_string(dahdi_chan_name, "DAHDI", sizeof(dahdi_chan_name));
-				dahdi_chan_name_len = 5;
-			}
 		} else if (!strcasecmp(v->name, "entityid")) {
 			struct ast_eid tmp_eid;
 			if (!ast_str_to_eid(&tmp_eid, v->value)) {




More information about the asterisk-commits mailing list