Make notification message a bit less confusing
This commit is contained in:
parent
b43122a80f
commit
139cee97e5
1 changed files with 2 additions and 2 deletions
|
@ -30,11 +30,11 @@ void check_users() {
|
|||
res_err_txt = strerror(res_errno);
|
||||
char *notification_payload;
|
||||
int notification_payload_len;
|
||||
const char *notification_payload_fmt = "samuel doesn't exist, LDAP is probably broken somehow. (getpwnam returned %s)";
|
||||
const char *notification_payload_fmt = "samuel doesn't exist, LDAP is probably broken somehow. (getpwnam returned errno %s/%d)";
|
||||
/* TODO: set a realistic payload length */
|
||||
notification_payload_len = strlen(notification_payload_fmt) + strlen(res_err_txt) + 1;
|
||||
notification_payload = malloc(notification_payload_len+1);
|
||||
snprintf(notification_payload, notification_payload_len, notification_payload_fmt, res_err_txt);
|
||||
snprintf(notification_payload, notification_payload_len, notification_payload_fmt, res_err_txt, res_errno);
|
||||
int send_alarm_result;
|
||||
send_alarm_result = send_alarm(notification_payload);
|
||||
/* We only set this to 1 if we successfully reported the issue. */
|
||||
|
|
Loading…
Reference in a new issue