add LPT pin number to host structure
This commit is contained in:
5
yasnd.c
5
yasnd.c
@ -154,6 +154,7 @@ void init()
|
||||
{
|
||||
cfg_t* host = cfg_getnsec(cfg, "host", i);
|
||||
hosts[i].hostname=cfg_getstr(host,"hostname");
|
||||
hosts[i].lpt_pin=cfg_getint(host,"lpt_pin");
|
||||
hosts[i].fail_count=0;
|
||||
hosts[i].alert_sent=false;
|
||||
}
|
||||
@ -195,7 +196,9 @@ void check_host(int num,host_decl* host)
|
||||
*/
|
||||
void reset_pin(int pin_num)
|
||||
{
|
||||
if (pin_num<1 || pin_num>8)
|
||||
if (pin_num==0)
|
||||
return; // there is no LPT control for target host
|
||||
if (pin_num<0 || pin_num>8)
|
||||
{
|
||||
log_event("Error: incorrent LPT pin number");
|
||||
return;
|
||||
|
Reference in New Issue
Block a user