mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-12-26 20:31:17 +00:00
Bugfix: crash when apcupsd isnt running
This commit is contained in:
parent
a1ddcc0786
commit
90f5701f3e
@ -181,7 +181,7 @@ void update_apcupsd(void) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#ifdef HAVE_GETHOSTBYNAME_R
|
#ifdef HAVE_GETHOSTBYNAME_R
|
||||||
if (gethostbyname_r(info.apcupsd.host, &he_mem, hostbuff, sizeof(hostbuff), &he, &he_errno)) {
|
if (gethostbyname_r(info.apcupsd.host, &he_mem, hostbuff, sizeof(hostbuff), &he, &he_errno) || !he ) {
|
||||||
NORM_ERR("APCUPSD gethostbyname_r: %s", hstrerror(h_errno));
|
NORM_ERR("APCUPSD gethostbyname_r: %s", hstrerror(h_errno));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user