aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_skel.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2005-11-29 04:41:19 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2005-11-29 04:41:19 +0000
commit7a9346f5931747a3557d1e10c8acd257f5e66c0b (patch)
treefeeba6b6d8f3ffb2c34872cf0337545ecc25166b /apps/app_skel.c
parent8712676ca87baf03dd2a684e0a733e0c5764978a (diff)
fix some typos and add the reload function
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7215 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_skel.c')
-rwxr-xr-xapps/app_skel.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/apps/app_skel.c b/apps/app_skel.c
index f0731c4e3..089bf0928 100755
--- a/apps/app_skel.c
+++ b/apps/app_skel.c
@@ -3,7 +3,7 @@
*
* Copyright (C) <Year>, <Your Name Here>
*
- * <Your Name Here> <<You Email Here>>
+ * <Your Name Here> <<Your Email Here>>
*
* See http://www.asterisk.org for more information about
* the Asterisk project. Please do not directly contact
@@ -20,7 +20,7 @@
*
* \brief Skeleton application
*
- * This is a skeleton for development of an Asterisk application */
+ * This is a skeleton for development of an Asterisk application
* \ingroup applications
*/
@@ -68,7 +68,7 @@ static int app_exec(struct ast_channel *chan, void *data)
int res = 0;
struct ast_flags flags;
struct localuser *u;
- char *options=NULL;
+ char *options = NULL;
char *dummy = NULL;
char *args;
int argc = 0;
@@ -77,12 +77,11 @@ static int app_exec(struct ast_channel *chan, void *data)
if (ast_strlen_zero(data)) {
ast_log(LOG_WARNING, "%s requires an argument (dummy|[options])\n",app);
- LOCAL_USER_REMOVE(u);
return -1;
}
LOCAL_USER_ADD(u);
-
+
/* Do our thing here */
/* We need to make a copy of the input string if we are going to modify it! */
@@ -112,7 +111,7 @@ static int app_exec(struct ast_channel *chan, void *data)
ast_log(LOG_NOTICE,"Option C is set with : %s\n", opts[1] ? opts[1] : "<unspecified>");
LOCAL_USER_REMOVE(u);
-
+
return res;
}
@@ -121,7 +120,7 @@ int unload_module(void)
int res;
res = ast_unregister_application(app);
-
+
STANDARD_HANGUP_LOCALUSERS;
return res;
@@ -132,6 +131,13 @@ int load_module(void)
return ast_register_application(app, app_exec, synopsis, descrip);
}
+int reload(void)
+{
+ /* This function will be called if a 'reload' is requested */
+
+ return 0;
+}
+
char *description(void)
{
return tdesc;
@@ -140,7 +146,9 @@ char *description(void)
int usecount(void)
{
int res;
+
STANDARD_USECOUNT(res);
+
return res;
}