Merged revisions 51341 via svnmerge from
[asterisk/asterisk.git] / funcs / func_groupcount.c
index deb2954..1246277 100644 (file)
  * 
  */
 
+#include "asterisk.h"
+
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
 #include <sys/types.h>
 
-#include "asterisk.h"
-
-ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
-
 #include "asterisk/module.h"
 #include "asterisk/channel.h"
 #include "asterisk/pbx.h"
@@ -36,7 +36,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 #include "asterisk/utils.h"
 #include "asterisk/app.h"
 
-static int group_count_function_read(struct ast_channel *chan, char *cmd,
+static int group_count_function_read(struct ast_channel *chan, const char *cmd,
                                     char *data, char *buf, size_t len)
 {
        int count;
@@ -72,7 +72,7 @@ static struct ast_custom_function group_count_function = {
 };
 
 static int group_match_count_function_read(struct ast_channel *chan,
-                                          char *cmd, char *data, char *buf,
+                                          const char *cmd, char *data, char *buf,
                                           size_t len)
 {
        int count;
@@ -102,7 +102,7 @@ static struct ast_custom_function group_match_count_function = {
        .write = NULL,
 };
 
-static int group_function_read(struct ast_channel *chan, char *cmd,
+static int group_function_read(struct ast_channel *chan, const char *cmd,
                               char *data, char *buf, size_t len)
 {
        char varname[256];
@@ -122,7 +122,7 @@ static int group_function_read(struct ast_channel *chan, char *cmd,
        return 0;
 }
 
-static int group_function_write(struct ast_channel *chan, char *cmd,
+static int group_function_write(struct ast_channel *chan, const char *cmd,
                                char *data, const char *value)
 {
        char grpcat[256];
@@ -149,7 +149,7 @@ static struct ast_custom_function group_function = {
        .write = group_function_write,
 };
 
-static int group_list_function_read(struct ast_channel *chan, char *cmd,
+static int group_list_function_read(struct ast_channel *chan, const char *cmd,
                                    char *data, char *buf, size_t len)
 {
        struct ast_var_t *current;
@@ -195,9 +195,7 @@ static struct ast_custom_function group_list_function = {
        .write = NULL,
 };
 
-static char *tdesc = "Channel group dialplan functions";
-
-int unload_module(void)
+static int unload_module(void)
 {
        int res = 0;
 
@@ -209,7 +207,7 @@ int unload_module(void)
        return res;
 }
 
-int load_module(void)
+static int load_module(void)
 {
        int res = 0;
 
@@ -221,17 +219,4 @@ int load_module(void)
        return res;
 }
 
-char *description(void)
-{
-       return tdesc;
-}
-
-int usecount(void)
-{
-       return 0;
-}
-
-char *key()
-{
-       return ASTERISK_GPL_KEY;
-}
+AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Channel group dialplan functions");