mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-30 02:26:23 +00:00
Global var cleanup - constification and removing unused vars.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@199479 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -45,7 +45,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
|||||||
#include "asterisk/utils.h"
|
#include "asterisk/utils.h"
|
||||||
#include "asterisk/lock.h"
|
#include "asterisk/lock.h"
|
||||||
|
|
||||||
static char *app = "ADSIProg";
|
static const char app[] = "ADSIProg";
|
||||||
|
|
||||||
/*** DOCUMENTATION
|
/*** DOCUMENTATION
|
||||||
<application name="ADSIProg" language="en_US">
|
<application name="ADSIProg" language="en_US">
|
||||||
@@ -71,7 +71,7 @@ static char *app = "ADSIProg";
|
|||||||
|
|
||||||
struct adsi_event {
|
struct adsi_event {
|
||||||
int id;
|
int id;
|
||||||
char *name;
|
const char *name;
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct adsi_event events[] = {
|
static const struct adsi_event events[] = {
|
||||||
|
@@ -62,7 +62,7 @@ struct event_node{
|
|||||||
|
|
||||||
typedef struct event_node event_node_t;
|
typedef struct event_node event_node_t;
|
||||||
|
|
||||||
static char *app = "AlarmReceiver";
|
static const char app[] = "AlarmReceiver";
|
||||||
/*** DOCUMENTATION
|
/*** DOCUMENTATION
|
||||||
<application name="AlarmReceiver" language="en_US">
|
<application name="AlarmReceiver" language="en_US">
|
||||||
<synopsis>
|
<synopsis>
|
||||||
|
@@ -124,7 +124,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
|||||||
|
|
||||||
***/
|
***/
|
||||||
|
|
||||||
static char *app = "AMD";
|
static const char app[] = "AMD";
|
||||||
|
|
||||||
#define STATE_IN_WORD 1
|
#define STATE_IN_WORD 1
|
||||||
#define STATE_IN_SILENCE 2
|
#define STATE_IN_SILENCE 2
|
||||||
|
@@ -43,7 +43,7 @@ enum {
|
|||||||
OPT_DATABASE = (1 << 1),
|
OPT_DATABASE = (1 << 1),
|
||||||
OPT_MULTIPLE = (1 << 3),
|
OPT_MULTIPLE = (1 << 3),
|
||||||
OPT_REMOVE = (1 << 4),
|
OPT_REMOVE = (1 << 4),
|
||||||
} auth_option_flags;
|
};
|
||||||
|
|
||||||
AST_APP_OPTIONS(auth_app_options, {
|
AST_APP_OPTIONS(auth_app_options, {
|
||||||
AST_APP_OPTION('a', OPT_ACCOUNT),
|
AST_APP_OPTION('a', OPT_ACCOUNT),
|
||||||
@@ -53,7 +53,7 @@ AST_APP_OPTIONS(auth_app_options, {
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
static char *app = "Authenticate";
|
static const char app[] = "Authenticate";
|
||||||
/*** DOCUMENTATION
|
/*** DOCUMENTATION
|
||||||
<application name="Authenticate" language="en_US">
|
<application name="Authenticate" language="en_US">
|
||||||
<synopsis>
|
<synopsis>
|
||||||
|
@@ -41,7 +41,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
|||||||
#include "asterisk/app.h"
|
#include "asterisk/app.h"
|
||||||
#include "asterisk/devicestate.h"
|
#include "asterisk/devicestate.h"
|
||||||
|
|
||||||
static char *app = "ChanIsAvail";
|
static const char app[] = "ChanIsAvail";
|
||||||
|
|
||||||
/*** DOCUMENTATION
|
/*** DOCUMENTATION
|
||||||
<application name="ChanIsAvail" language="en_US">
|
<application name="ChanIsAvail" language="en_US">
|
||||||
|
@@ -60,7 +60,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
|||||||
</description>
|
</description>
|
||||||
</application>
|
</application>
|
||||||
***/
|
***/
|
||||||
static char *app = "ChannelRedirect";
|
static const char app[] = "ChannelRedirect";
|
||||||
|
|
||||||
static int asyncgoto_exec(struct ast_channel *chan, const char *data)
|
static int asyncgoto_exec(struct ast_channel *chan, const char *data)
|
||||||
{
|
{
|
||||||
|
@@ -325,11 +325,11 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
|||||||
</application>
|
</application>
|
||||||
***/
|
***/
|
||||||
|
|
||||||
static const char * const app_chan = "ChanSpy";
|
static const char app_chan[] = "ChanSpy";
|
||||||
|
|
||||||
static const char * const app_ext = "ExtenSpy";
|
static const char app_ext[] = "ExtenSpy";
|
||||||
|
|
||||||
static const char * const app_dahdiscan = "DAHDIScan";
|
static const char app_dahdiscan[] = "DAHDIScan";
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
OPTION_QUIET = (1 << 0), /* Quiet, no announcement */
|
OPTION_QUIET = (1 << 0), /* Quiet, no announcement */
|
||||||
@@ -349,7 +349,7 @@ enum {
|
|||||||
OPTION_DTMF_EXIT = (1 << 14), /* Set DTMF to exit, added for DAHDIScan integration */
|
OPTION_DTMF_EXIT = (1 << 14), /* Set DTMF to exit, added for DAHDIScan integration */
|
||||||
OPTION_DTMF_CYCLE = (1 << 15), /* Custom DTMF for cycling next avaliable channel, (default is '*') */
|
OPTION_DTMF_CYCLE = (1 << 15), /* Custom DTMF for cycling next avaliable channel, (default is '*') */
|
||||||
OPTION_DAHDI_SCAN = (1 << 16), /* Scan groups in DAHDIScan mode */
|
OPTION_DAHDI_SCAN = (1 << 16), /* Scan groups in DAHDIScan mode */
|
||||||
} chanspy_opt_flags;
|
};
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
OPT_ARG_VOLUME = 0,
|
OPT_ARG_VOLUME = 0,
|
||||||
@@ -360,7 +360,7 @@ enum {
|
|||||||
OPT_ARG_EXIT,
|
OPT_ARG_EXIT,
|
||||||
OPT_ARG_CYCLE,
|
OPT_ARG_CYCLE,
|
||||||
OPT_ARG_ARRAY_SIZE,
|
OPT_ARG_ARRAY_SIZE,
|
||||||
} chanspy_opt_args;
|
};
|
||||||
|
|
||||||
AST_APP_OPTIONS(spy_opts, {
|
AST_APP_OPTIONS(spy_opts, {
|
||||||
AST_APP_OPTION('q', OPTION_QUIET),
|
AST_APP_OPTION('q', OPTION_QUIET),
|
||||||
|
@@ -111,7 +111,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
|||||||
* bridge lock if it is important.
|
* bridge lock if it is important.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static const char * const app = "ConfBridge";
|
static const char app[] = "ConfBridge";
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
OPTION_ADMIN = (1 << 0), /*!< Set if the caller is an administrator */
|
OPTION_ADMIN = (1 << 0), /*!< Set if the caller is an administrator */
|
||||||
|
@@ -92,7 +92,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
|||||||
</description>
|
</description>
|
||||||
</application>
|
</application>
|
||||||
***/
|
***/
|
||||||
static const char * const app = "ControlPlayback";
|
static const char app[] = "ControlPlayback";
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
OPT_OFFSET = (1 << 1),
|
OPT_OFFSET = (1 << 1),
|
||||||
|
@@ -70,7 +70,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
|||||||
</description>
|
</description>
|
||||||
</application>
|
</application>
|
||||||
***/
|
***/
|
||||||
static char *app = "DAHDIBarge";
|
static const char app[] = "DAHDIBarge";
|
||||||
|
|
||||||
#define CONF_SIZE 160
|
#define CONF_SIZE 160
|
||||||
|
|
||||||
|
@@ -73,7 +73,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
|||||||
|
|
||||||
***/
|
***/
|
||||||
|
|
||||||
static char *app = "DAHDIRAS";
|
static const char app[] = "DAHDIRAS";
|
||||||
|
|
||||||
#define PPP_MAX_ARGS 32
|
#define PPP_MAX_ARGS 32
|
||||||
#define PPP_EXEC "/usr/sbin/pppd"
|
#define PPP_EXEC "/usr/sbin/pppd"
|
||||||
|
@@ -79,9 +79,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
|||||||
</application>
|
</application>
|
||||||
***/
|
***/
|
||||||
|
|
||||||
/*! \todo XXX Remove this application after 1.4 is relased */
|
static const char d_app[] = "DBdel";
|
||||||
static char *d_app = "DBdel";
|
static const char dt_app[] = "DBdeltree";
|
||||||
static char *dt_app = "DBdeltree";
|
|
||||||
|
|
||||||
static int deltree_exec(struct ast_channel *chan, const char *data)
|
static int deltree_exec(struct ast_channel *chan, const char *data)
|
||||||
{
|
{
|
||||||
|
@@ -465,8 +465,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
|||||||
</application>
|
</application>
|
||||||
***/
|
***/
|
||||||
|
|
||||||
static char *app = "Dial";
|
static const char app[] = "Dial";
|
||||||
static char *rapp = "RetryDial";
|
static const char rapp[] = "RetryDial";
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
OPT_ANNOUNCE = (1 << 0),
|
OPT_ANNOUNCE = (1 << 0),
|
||||||
|
@@ -55,7 +55,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
|||||||
</application>
|
</application>
|
||||||
***/
|
***/
|
||||||
|
|
||||||
static char *app = "Dictate";
|
static const char app[] = "Dictate";
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
DFLAG_RECORD = (1 << 0),
|
DFLAG_RECORD = (1 << 0),
|
||||||
|
@@ -84,8 +84,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
|||||||
</application>
|
</application>
|
||||||
***/
|
***/
|
||||||
|
|
||||||
static const char * const app = "Pickup";
|
static const char app[] = "Pickup";
|
||||||
static const char * const app2 = "PickupChan";
|
static const char app2[] = "PickupChan";
|
||||||
/*! \todo This application should return a result code, like PICKUPRESULT */
|
/*! \todo This application should return a result code, like PICKUPRESULT */
|
||||||
|
|
||||||
/* Perform actual pickup between two channels */
|
/* Perform actual pickup between two channels */
|
||||||
|
@@ -113,7 +113,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
|||||||
</application>
|
</application>
|
||||||
|
|
||||||
***/
|
***/
|
||||||
static char *app = "Directory";
|
static const char app[] = "Directory";
|
||||||
|
|
||||||
/* For simplicity, I'm keeping the format compatible with the voicemail config,
|
/* For simplicity, I'm keeping the format compatible with the voicemail config,
|
||||||
but i'm open to suggestions for isolating it */
|
but i'm open to suggestions for isolating it */
|
||||||
@@ -128,7 +128,7 @@ enum {
|
|||||||
OPT_LISTBYLASTNAME = (1 << 4),
|
OPT_LISTBYLASTNAME = (1 << 4),
|
||||||
OPT_LISTBYEITHER = OPT_LISTBYFIRSTNAME | OPT_LISTBYLASTNAME,
|
OPT_LISTBYEITHER = OPT_LISTBYFIRSTNAME | OPT_LISTBYLASTNAME,
|
||||||
OPT_PAUSE = (1 << 5),
|
OPT_PAUSE = (1 << 5),
|
||||||
} directory_option_flags;
|
};
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
OPT_ARG_FIRSTNAME = 0,
|
OPT_ARG_FIRSTNAME = 0,
|
||||||
|
@@ -110,12 +110,12 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
|||||||
</see-also>
|
</see-also>
|
||||||
</application>
|
</application>
|
||||||
***/
|
***/
|
||||||
static char *app = "DISA";
|
static const char app[] = "DISA";
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
NOANSWER_FLAG = (1 << 0),
|
NOANSWER_FLAG = (1 << 0),
|
||||||
POUND_TO_END_FLAG = (1 << 1),
|
POUND_TO_END_FLAG = (1 << 1),
|
||||||
} option_flags;
|
};
|
||||||
|
|
||||||
AST_APP_OPTIONS(app_opts, {
|
AST_APP_OPTIONS(app_opts, {
|
||||||
AST_APP_OPTION('n', NOANSWER_FLAG),
|
AST_APP_OPTION('n', NOANSWER_FLAG),
|
||||||
|
@@ -60,7 +60,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
|||||||
</application>
|
</application>
|
||||||
***/
|
***/
|
||||||
|
|
||||||
static char *app = "DumpChan";
|
static const char app[] = "DumpChan";
|
||||||
|
|
||||||
static int serialize_showchan(struct ast_channel *c, char *buf, size_t size)
|
static int serialize_showchan(struct ast_channel *c, char *buf, size_t size)
|
||||||
{
|
{
|
||||||
|
@@ -46,7 +46,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
|||||||
</application>
|
</application>
|
||||||
***/
|
***/
|
||||||
|
|
||||||
static char *app = "Echo";
|
static const char app[] = "Echo";
|
||||||
|
|
||||||
static int echo_exec(struct ast_channel *chan, const char *data)
|
static int echo_exec(struct ast_channel *chan, const char *data)
|
||||||
{
|
{
|
||||||
|
@@ -125,9 +125,9 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
|||||||
* affecting the dialplan.
|
* affecting the dialplan.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static char *app_exec = "Exec";
|
static const char app_exec[] = "Exec";
|
||||||
static char *app_tryexec = "TryExec";
|
static const char app_tryexec[] = "TryExec";
|
||||||
static char *app_execif = "ExecIf";
|
static const char app_execif[] = "ExecIf";
|
||||||
|
|
||||||
static int exec_exec(struct ast_channel *chan, const char *data)
|
static int exec_exec(struct ast_channel *chan, const char *data)
|
||||||
{
|
{
|
||||||
|
@@ -141,8 +141,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
|||||||
|
|
||||||
***/
|
***/
|
||||||
|
|
||||||
static char *app_sndfax_name = "SendFAX";
|
static const char app_sndfax_name[] = "SendFAX";
|
||||||
static char *app_rcvfax_name = "ReceiveFAX";
|
static const char app_rcvfax_name[] = "ReceiveFAX";
|
||||||
|
|
||||||
#define MAX_SAMPLES 240
|
#define MAX_SAMPLES 240
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user