Commit c7e5131c authored by Robert Anderson's avatar Robert Anderson
Browse files

Improved error handling for cleanup

Return -1 as used in the rest of policyd cleanup instead of carrying on after an error
parent e6e98822
......@@ -53,6 +53,7 @@ sub cleanup
");
if (!$sth) {
$server->log(LOG_ERR,"[CORE] Failed to remove old session tracking records: ".cbp::dblayer::Error());
return -1;
}
$server->log(LOG_INFO,"[CORE] Removed ".( $sth ne "0E0" ? $sth : 0)." records from session tracking table");
}
......
......@@ -730,6 +730,7 @@ sub cleanup
");
if (!$sth) {
$server->log(LOG_ERR,"[QUOTAS] Failed to remove old quota tracking records: ".cbp::dblayer::Error());
return -1;
}
$server->log(LOG_INFO,"[QUOTAS] Removed ".( $sth ne "0E0" ? $sth : 0).." records from tracking table");
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment