Author: kmoore
Date: Wed Aug  7 07:14:47 2013
New Revision: 396354

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=396354
Log:
Rework sounds reloading

Modified:
    team/kmoore/sound_index_cli/main/loader.c
    team/kmoore/sound_index_cli/main/sounds_index.c

Modified: team/kmoore/sound_index_cli/main/loader.c
URL: 
http://svnview.digium.com/svn/asterisk/team/kmoore/sound_index_cli/main/loader.c?view=diff&rev=396354&r1=396353&r2=396354
==============================================================================
--- team/kmoore/sound_index_cli/main/loader.c (original)
+++ team/kmoore/sound_index_cli/main/loader.c Wed Aug  7 07:14:47 2013
@@ -56,6 +56,7 @@
 #include "asterisk/heap.h"
 #include "asterisk/app.h"
 #include "asterisk/test.h"
+#include "asterisk/sounds_index.h"
 
 #include <dlfcn.h>
 
@@ -319,6 +320,7 @@
        { "indications", ast_indications_reload },
        { "cel",        ast_cel_engine_reload },
        { "plc",        ast_plc_reload },
+       { "sounds",     ast_sounds_reindex },
        { NULL,         NULL }
 };
 

Modified: team/kmoore/sound_index_cli/main/sounds_index.c
URL: 
http://svnview.digium.com/svn/asterisk/team/kmoore/sound_index_cli/main/sounds_index.c?view=diff&rev=396354&r1=396353&r2=396354
==============================================================================
--- team/kmoore/sound_index_cli/main/sounds_index.c (original)
+++ team/kmoore/sound_index_cli/main/sounds_index.c Wed Aug  7 07:14:47 2013
@@ -186,33 +186,6 @@
        return 0;
 }
 
-/*! \brief Allow for reloading of sounds via the command line */
-static char *handle_cli_sounds_reload(struct ast_cli_entry *e, int cmd, struct 
ast_cli_args *a)
-{
-       switch (cmd) {
-       case CLI_INIT:
-               e->command = "sounds reload";
-               e->usage =
-                       "Usage: sounds reload\n"
-                       "       Reloads the index of sound files and their 
descriptions.\n";
-               return NULL;
-       case CLI_GENERATE:
-               return NULL;
-       }
-
-       if (a->argc != 2) {
-               return CLI_SHOWUSAGE;
-       }
-
-       if (ast_sounds_reindex()) {
-               ast_cli(a->fd, "Sound re-indexing failed.\n");
-               return CLI_FAILURE;
-       }
-
-       ast_cli(a->fd, "Sound files re-indexed.\n");
-       return CLI_SUCCESS;
-}
-
 /*! \brief Show a list of sounds available on the system */
 static char *handle_cli_sounds_show(struct ast_cli_entry *e, int cmd, struct 
ast_cli_args *a)
 {
@@ -296,7 +269,6 @@
 static struct ast_cli_entry cli_sounds[] = {
        AST_CLI_DEFINE(handle_cli_sounds_show, "Shows available sounds"),
        AST_CLI_DEFINE(handle_cli_sound_show, "Shows details about a specific 
sound"),
-       AST_CLI_DEFINE(handle_cli_sounds_reload, "Reload sounds index"),
 };
 
 static void sounds_cleanup(void)


--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

svn-commits mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/svn-commits

Reply via email to