Skip to content

Commit

Permalink
Add support for Soft Quota Grace period reset
Browse files Browse the repository at this point in the history
  • Loading branch information
lufik authored and joergsteffens committed Dec 2, 2016
1 parent b333fe9 commit 5067c6e
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/dird/quota.c
Expand Up @@ -250,6 +250,19 @@ bool check_softquotas(JCR *jcr)
}
}
}
} else if (jcr->res.client->GraceTime != 0) {
/*
* Reset softquota
*/
CLIENT_DBR cr;
memset(&cr, 0, sizeof(cr));
cr.ClientId = jcr->jr.ClientId;
if (!db_reset_quota_record(jcr, jcr->db, &cr)) {
Jmsg(jcr, M_WARNING, 0, _("Error setting Quota gracetime: ERR=%s\n"),
db_strerror(jcr->db));
} else {
Jmsg(jcr, M_ERROR, 0, _("Softquota Reset, Grace Period ends now.\n"));
}
}

bail_out:
Expand Down

0 comments on commit 5067c6e

Please sign in to comment.