Tweak some configuration semantics of opm

This commit is contained in:
Elizabeth Myers 2016-04-02 19:45:09 -05:00
parent d9364d2913
commit c1f4db3fb7

View file

@ -2054,7 +2054,7 @@ conf_end_opm(struct TopConf *tc)
if(!rb_dlink_list_length(&yy_opm_scanner_list))
{
conf_report_error("No opm scanners configured, disabling opm.");
conf_report_error("No opm scanners configured -- disabling opm.");
fail = true;
goto end;
}
@ -2089,10 +2089,13 @@ conf_end_opm(struct TopConf *tc)
/* If there's no listeners... */
fail = (yy_opm_port_ipv4 == 0 || yy_opm_port_ipv6 == 0);
if(!fail && yy_opm_timeout > 0)
if(!fail && yy_opm_timeout > 0 && yy_opm_timeout < 60)
/* Send timeout */
set_authd_timeout("opm_timeout", yy_opm_timeout);
else if(fail)
conf_report_error("No opm listeners -- disabling");
else if(yy_opm_timeout <= 0 || yy_opm_timeout >= 60)
conf_report_error("opm::timeout value is invalid -- ignoring");
end:
RB_DLINK_FOREACH_SAFE(ptr, nptr, yy_opm_scanner_list.head)