mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-30 10:33:13 +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/lock.h"
|
||||
|
||||
static char *app = "ADSIProg";
|
||||
static const char app[] = "ADSIProg";
|
||||
|
||||
/*** DOCUMENTATION
|
||||
<application name="ADSIProg" language="en_US">
|
||||
@@ -71,7 +71,7 @@ static char *app = "ADSIProg";
|
||||
|
||||
struct adsi_event {
|
||||
int id;
|
||||
char *name;
|
||||
const char *name;
|
||||
};
|
||||
|
||||
static const struct adsi_event events[] = {
|
||||
|
@@ -62,7 +62,7 @@ struct event_node{
|
||||
|
||||
typedef struct event_node event_node_t;
|
||||
|
||||
static char *app = "AlarmReceiver";
|
||||
static const char app[] = "AlarmReceiver";
|
||||
/*** DOCUMENTATION
|
||||
<application name="AlarmReceiver" language="en_US">
|
||||
<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_SILENCE 2
|
||||
|
@@ -43,7 +43,7 @@ enum {
|
||||
OPT_DATABASE = (1 << 1),
|
||||
OPT_MULTIPLE = (1 << 3),
|
||||
OPT_REMOVE = (1 << 4),
|
||||
} auth_option_flags;
|
||||
};
|
||||
|
||||
AST_APP_OPTIONS(auth_app_options, {
|
||||
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
|
||||
<application name="Authenticate" language="en_US">
|
||||
<synopsis>
|
||||
|
@@ -41,7 +41,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
||||
#include "asterisk/app.h"
|
||||
#include "asterisk/devicestate.h"
|
||||
|
||||
static char *app = "ChanIsAvail";
|
||||
static const char app[] = "ChanIsAvail";
|
||||
|
||||
/*** DOCUMENTATION
|
||||
<application name="ChanIsAvail" language="en_US">
|
||||
|
@@ -60,7 +60,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
||||
</description>
|
||||
</application>
|
||||
***/
|
||||
static char *app = "ChannelRedirect";
|
||||
static const char app[] = "ChannelRedirect";
|
||||
|
||||
static int asyncgoto_exec(struct ast_channel *chan, const char *data)
|
||||
{
|
||||
|
@@ -325,11 +325,11 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
||||
</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 {
|
||||
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_CYCLE = (1 << 15), /* Custom DTMF for cycling next avaliable channel, (default is '*') */
|
||||
OPTION_DAHDI_SCAN = (1 << 16), /* Scan groups in DAHDIScan mode */
|
||||
} chanspy_opt_flags;
|
||||
};
|
||||
|
||||
enum {
|
||||
OPT_ARG_VOLUME = 0,
|
||||
@@ -360,7 +360,7 @@ enum {
|
||||
OPT_ARG_EXIT,
|
||||
OPT_ARG_CYCLE,
|
||||
OPT_ARG_ARRAY_SIZE,
|
||||
} chanspy_opt_args;
|
||||
};
|
||||
|
||||
AST_APP_OPTIONS(spy_opts, {
|
||||
AST_APP_OPTION('q', OPTION_QUIET),
|
||||
|
@@ -111,7 +111,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
||||
* bridge lock if it is important.
|
||||
*/
|
||||
|
||||
static const char * const app = "ConfBridge";
|
||||
static const char app[] = "ConfBridge";
|
||||
|
||||
enum {
|
||||
OPTION_ADMIN = (1 << 0), /*!< Set if the caller is an administrator */
|
||||
|
@@ -92,7 +92,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
||||
</description>
|
||||
</application>
|
||||
***/
|
||||
static const char * const app = "ControlPlayback";
|
||||
static const char app[] = "ControlPlayback";
|
||||
|
||||
enum {
|
||||
OPT_OFFSET = (1 << 1),
|
||||
|
@@ -70,7 +70,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
||||
</description>
|
||||
</application>
|
||||
***/
|
||||
static char *app = "DAHDIBarge";
|
||||
static const char app[] = "DAHDIBarge";
|
||||
|
||||
#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_EXEC "/usr/sbin/pppd"
|
||||
|
@@ -79,9 +79,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
||||
</application>
|
||||
***/
|
||||
|
||||
/*! \todo XXX Remove this application after 1.4 is relased */
|
||||
static char *d_app = "DBdel";
|
||||
static char *dt_app = "DBdeltree";
|
||||
static const char d_app[] = "DBdel";
|
||||
static const char dt_app[] = "DBdeltree";
|
||||
|
||||
static int deltree_exec(struct ast_channel *chan, const char *data)
|
||||
{
|
||||
|
@@ -465,8 +465,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
||||
</application>
|
||||
***/
|
||||
|
||||
static char *app = "Dial";
|
||||
static char *rapp = "RetryDial";
|
||||
static const char app[] = "Dial";
|
||||
static const char rapp[] = "RetryDial";
|
||||
|
||||
enum {
|
||||
OPT_ANNOUNCE = (1 << 0),
|
||||
|
@@ -55,7 +55,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
||||
</application>
|
||||
***/
|
||||
|
||||
static char *app = "Dictate";
|
||||
static const char app[] = "Dictate";
|
||||
|
||||
typedef enum {
|
||||
DFLAG_RECORD = (1 << 0),
|
||||
|
@@ -84,8 +84,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
||||
</application>
|
||||
***/
|
||||
|
||||
static const char * const app = "Pickup";
|
||||
static const char * const app2 = "PickupChan";
|
||||
static const char app[] = "Pickup";
|
||||
static const char app2[] = "PickupChan";
|
||||
/*! \todo This application should return a result code, like PICKUPRESULT */
|
||||
|
||||
/* Perform actual pickup between two channels */
|
||||
|
@@ -113,7 +113,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
||||
</application>
|
||||
|
||||
***/
|
||||
static char *app = "Directory";
|
||||
static const char app[] = "Directory";
|
||||
|
||||
/* For simplicity, I'm keeping the format compatible with the voicemail config,
|
||||
but i'm open to suggestions for isolating it */
|
||||
@@ -128,7 +128,7 @@ enum {
|
||||
OPT_LISTBYLASTNAME = (1 << 4),
|
||||
OPT_LISTBYEITHER = OPT_LISTBYFIRSTNAME | OPT_LISTBYLASTNAME,
|
||||
OPT_PAUSE = (1 << 5),
|
||||
} directory_option_flags;
|
||||
};
|
||||
|
||||
enum {
|
||||
OPT_ARG_FIRSTNAME = 0,
|
||||
|
@@ -110,12 +110,12 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
||||
</see-also>
|
||||
</application>
|
||||
***/
|
||||
static char *app = "DISA";
|
||||
static const char app[] = "DISA";
|
||||
|
||||
enum {
|
||||
NOANSWER_FLAG = (1 << 0),
|
||||
POUND_TO_END_FLAG = (1 << 1),
|
||||
} option_flags;
|
||||
};
|
||||
|
||||
AST_APP_OPTIONS(app_opts, {
|
||||
AST_APP_OPTION('n', NOANSWER_FLAG),
|
||||
|
@@ -60,7 +60,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
||||
</application>
|
||||
***/
|
||||
|
||||
static char *app = "DumpChan";
|
||||
static const char app[] = "DumpChan";
|
||||
|
||||
static int serialize_showchan(struct ast_channel *c, char *buf, size_t size)
|
||||
{
|
||||
|
@@ -46,7 +46,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
||||
</application>
|
||||
***/
|
||||
|
||||
static char *app = "Echo";
|
||||
static const char app[] = "Echo";
|
||||
|
||||
static int echo_exec(struct ast_channel *chan, const char *data)
|
||||
{
|
||||
|
@@ -125,9 +125,9 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
||||
* affecting the dialplan.
|
||||
*/
|
||||
|
||||
static char *app_exec = "Exec";
|
||||
static char *app_tryexec = "TryExec";
|
||||
static char *app_execif = "ExecIf";
|
||||
static const char app_exec[] = "Exec";
|
||||
static const char app_tryexec[] = "TryExec";
|
||||
static const char app_execif[] = "ExecIf";
|
||||
|
||||
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 char *app_rcvfax_name = "ReceiveFAX";
|
||||
static const char app_sndfax_name[] = "SendFAX";
|
||||
static const char app_rcvfax_name[] = "ReceiveFAX";
|
||||
|
||||
#define MAX_SAMPLES 240
|
||||
|
||||
|
Reference in New Issue
Block a user