fix up namespace pollution for dahdi_chan_mode enum

correct registration of AMI actions in chan_dahdi; in zap-only mode, only register the Zap flavors of the actions (and use Zap prefixes for headers and acks), but in dahdi+zap mode, register both Zap and DAHDI flavors of actions



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@132787 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Kevin P. Fleming
2008-07-22 22:11:01 +00:00
parent 99d9727a84
commit 6a0bcc4754
6 changed files with 144 additions and 79 deletions

View File

@@ -174,10 +174,10 @@ char record_cache_dir[AST_CACHE_DIR_LEN] = AST_TMP_DIR;
char debug_filename[AST_FILENAME_MAX] = "";
#ifdef HAVE_ZAPTEL
char _dahdi_chan_name[AST_CHANNEL_NAME] = "Zap";
enum dahdi_chan_modes dahdi_chan_mode = ZAP_ONLY_MODE;
enum dahdi_chan_modes dahdi_chan_mode = CHAN_ZAP_MODE;
#else
char _dahdi_chan_name[AST_CHANNEL_NAME] = "DAHDI";
enum dahdi_chan_modes dahdi_chan_mode = DAHDI_PLUS_ZAP;
enum dahdi_chan_modes dahdi_chan_mode = CHAN_DAHDI_PLUS_ZAP_MODE;
#endif
const char *dahdi_chan_name;
@@ -2593,12 +2593,12 @@ static void ast_readconfig(void)
#ifdef HAVE_ZAPTEL
if (ast_true(v->value)) {
strcpy(_dahdi_chan_name, "DAHDI");
dahdi_chan_mode = DAHDI_PLUS_ZAP;
dahdi_chan_mode = CHAN_DAHDI_PLUS_ZAP_MODE;
}
#else
if (ast_false(v->value)) {
strcpy(_dahdi_chan_name, "Zap");
dahdi_chan_mode = ZAP_ONLY_MODE;
dahdi_chan_mode = CHAN_ZAP_MODE;
}
#endif
}