From 58ed1b07ab2c13a7c0ef8e84e5bcfd3a49b5cbac Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Thu, 9 Nov 2006 21:26:27 +0000 Subject: [PATCH] Work around an issue that caused menuselect to display a bogus description for app_voicemail and chan_zap. These modules use some preprocessor directives to determine what it will report to Asterisk as its description. However, the way we extract this information from the source files for menuselect is not smart enough to figure this out. (issue #8326, #8328) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@47391 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- apps/app_voicemail.c | 4 ++++ build_tools/prep_moduledeps | 2 +- channels/chan_zap.c | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index 149ba73a98..1503199832 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -8649,6 +8649,10 @@ static void get_mailbox_delimiter(MAILSTREAM *stream) { } #endif /* IMAP_STORAGE */ + +/* This is a workaround so that menuselect displays a proper description + * AST_MODULE_INFO(, , "Comedian Mail (Voicemail System)" + */ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, tdesc, .load = load_module, diff --git a/build_tools/prep_moduledeps b/build_tools/prep_moduledeps index d6ea8aef61..93dc896759 100755 --- a/build_tools/prep_moduledeps +++ b/build_tools/prep_moduledeps @@ -1,7 +1,7 @@ #!/bin/sh get_description() { - TDESC=`grep -e AST_MODULE_INFO ${1} | cut -d '"' -f 2` + TDESC=`grep -m 1 -e AST_MODULE_INFO ${1} | cut -d '"' -f 2` } process_dir() { diff --git a/channels/chan_zap.c b/channels/chan_zap.c index 9ab10e593c..b035ec4d6a 100644 --- a/channels/chan_zap.c +++ b/channels/chan_zap.c @@ -11354,6 +11354,10 @@ static int reload(void) return 0; } +/* This is a workaround so that menuselect displays a proper description + * AST_MODULE_INFO(, , "Zapata Telephony" + */ + #ifdef ZAPATA_PRI #define tdesc "Zapata Telephony w/PRI" #else