Bug # 1179: Remove "show voicemail users" when using MYSQL voicemail interface
authorMalcolm Davenport <malcolmd@digium.com>
Fri, 19 Mar 2004 21:42:48 +0000 (21:42 +0000)
committerMalcolm Davenport <malcolmd@digium.com>
Fri, 19 Mar 2004 21:42:48 +0000 (21:42 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2480 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_voicemail.c

index f4e19ef..8382d1e 100755 (executable)
@@ -3051,6 +3051,7 @@ static int append_mailbox(char *context, char *mbox, char *data)
        return 0;
 }
 
        return 0;
 }
 
+#ifndef USEMYSQLVM
 /* XXX TL Bug 690 */
 static char show_voicemail_users_help[] =
 "Usage: show voicemail users [for <context>]\n"
 /* XXX TL Bug 690 */
 static char show_voicemail_users_help[] =
 "Usage: show voicemail users [for <context>]\n"
@@ -3173,6 +3174,7 @@ static struct ast_cli_entry show_voicemail_zones_cli =
        handle_show_voicemail_zones, "List zone message formats",
        show_voicemail_zones_help, NULL };
 
        handle_show_voicemail_zones, "List zone message formats",
        show_voicemail_zones_help, NULL };
 
+#endif
 
 static int load_config(void)
 {
 
 static int load_config(void)
 {
@@ -3425,8 +3427,10 @@ int unload_module(void)
        res |= ast_unregister_application(app2);
        res |= ast_unregister_application(capp2);
        sql_close();
        res |= ast_unregister_application(app2);
        res |= ast_unregister_application(capp2);
        sql_close();
+#ifndef USEMYSQLVM
        ast_cli_unregister(&show_voicemail_users_cli);
        ast_cli_unregister(&show_voicemail_zones_cli);
        ast_cli_unregister(&show_voicemail_users_cli);
        ast_cli_unregister(&show_voicemail_zones_cli);
+#endif
        return res;
 }
 
        return res;
 }
 
@@ -3448,8 +3452,10 @@ int load_module(void)
                ast_log(LOG_WARNING, "SQL init\n");
                return res;
        }
                ast_log(LOG_WARNING, "SQL init\n");
                return res;
        }
+#ifndef USEMYSQLVM     
        ast_cli_register(&show_voicemail_users_cli);
        ast_cli_register(&show_voicemail_zones_cli);
        ast_cli_register(&show_voicemail_users_cli);
        ast_cli_register(&show_voicemail_zones_cli);
+#endif
        return res;
 }
 
        return res;
 }