[asterisk-commits] r7215 - /trunk/apps/app_skel.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Mon Nov 28 22:41:20 CST 2005
Author: russell
Date: Mon Nov 28 22:41:19 2005
New Revision: 7215
URL: http://svn.digium.com/view/asterisk?rev=7215&view=rev
Log:
fix some typos and add the reload function
Modified:
trunk/apps/app_skel.c
Modified: trunk/apps/app_skel.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_skel.c?rev=7215&r1=7214&r2=7215&view=diff
==============================================================================
--- trunk/apps/app_skel.c (original)
+++ trunk/apps/app_skel.c Mon Nov 28 22:41:19 2005
@@ -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 @@
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 @@
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 @@
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 res;
res = ast_unregister_application(app);
-
+
STANDARD_HANGUP_LOCALUSERS;
return res;
@@ -132,6 +131,13 @@
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 @@
int usecount(void)
{
int res;
+
STANDARD_USECOUNT(res);
+
return res;
}
More information about the asterisk-commits
mailing list