Commit c3b8693e 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 618b3a85
......@@ -55,6 +55,7 @@ sub cleanup
);
if (!$sth) {
$server->log(LOG_ERR,"[CORE] Failed to remove old session tracking records: ".awitpt::db::dblayer::Error());
return -1;
}
$server->log(LOG_INFO,"[CORE] Removed ".( $sth ne "0E0" ? $sth : 0)." records from session tracking table");
}
......
......@@ -753,6 +753,7 @@ sub cleanup
);
if (!$sth) {
$server->log(LOG_ERR,"[QUOTAS] Failed to remove old quota tracking records: ".awitpt::db::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