rename variable "sms_send_enable" to "sms_enable"
This commit is contained in:
10
yasnd.c
10
yasnd.c
@ -11,7 +11,7 @@ cfg_t *cfg; // pointer to configuration structure
|
||||
host_decl* hosts=NULL; // structure with hosts' definitions
|
||||
int hosts_count=0; // count of hosts
|
||||
int debug_flag=0;
|
||||
bool sms_send_enable=false; // send or not send alerts via SMS
|
||||
bool sms_enable=false; // use SMS messages for control and reports?
|
||||
char* phone_device=NULL; // phone device for gammu, for example: "/dev/ttyACM0"
|
||||
char* phone_model=NULL; // gammu phone model, for example: "at"
|
||||
char* phone_connection=NULL; // gammu phone connection type, for example: "at"
|
||||
@ -101,7 +101,7 @@ void init()
|
||||
CFG_SIMPLE_INT("debug", &debug_flag),
|
||||
CFG_SIMPLE_BOOL("lpt_enable", &lpt_enable),
|
||||
CFG_SIMPLE_INT("lpt_port", &lpt_port),
|
||||
CFG_SIMPLE_BOOL("sms_send_enable", &sms_send_enable),
|
||||
CFG_SIMPLE_BOOL("sms_enable", &sms_enable),
|
||||
CFG_SIMPLE_STR("phone_device", &phone_device),
|
||||
CFG_SIMPLE_STR("phone_model", &phone_connection),
|
||||
CFG_SIMPLE_STR("phone_connection", &phone_model),
|
||||
@ -117,8 +117,8 @@ void init()
|
||||
log_event("Error parsing config file");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
// if SMS sending is enabled, all of phone parameters must be explicitly defined
|
||||
if (sms_send_enable)
|
||||
// if SMS is enabled, all of phone parameters must be explicitly defined
|
||||
if (sms_enable)
|
||||
{
|
||||
if (phone_model==NULL)
|
||||
{
|
||||
@ -161,7 +161,7 @@ void init()
|
||||
hosts[i].reaction_obtained=false;
|
||||
}
|
||||
// initialize gammu structures
|
||||
if (sms_send_enable)
|
||||
if (sms_enable)
|
||||
gammu_init();
|
||||
// initialize LPT control circuit
|
||||
if (lpt_enable)
|
||||
|
Reference in New Issue
Block a user