Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
DVR: cosmetic changes for the previous patch
  • Loading branch information
perexg committed Dec 3, 2015
1 parent f9c0c6a commit bba94ab
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/api/api_dvr.c
Expand Up @@ -240,7 +240,8 @@ api_dvr_entry_create_by_event
e, 0, 0,
perm->aa_username,
perm->aa_representative,
NULL, DVR_PRIO_NORMAL, DVR_RET_DVRCONFIG, DVR_RET_DVRCONFIG, comment);
NULL, DVR_PRIO_NORMAL, DVR_RET_DVRCONFIG,
DVR_RET_DVRCONFIG, comment);
if (de)
dvr_entry_save(de);
}
Expand Down
4 changes: 2 additions & 2 deletions src/dvr/dvr_autorec.c
Expand Up @@ -1394,9 +1394,9 @@ uint32_t
dvr_autorec_get_retention_days( dvr_autorec_entry_t *dae )
{
if (dae->dae_retention > 0) {
uint32_t removal = dvr_autorec_get_removal_days(dae);
/* As we need the db entry when deleting the file on disk */
if (dvr_autorec_get_removal_days(dae) != DVR_RET_FOREVER &&
dvr_autorec_get_removal_days(dae) > dae->dae_retention)
if (removal != DVR_RET_FOREVER && removal > dae->dae_retention)
return DVR_RET_ONREMOVE;

return dae->dae_retention;
Expand Down
2 changes: 1 addition & 1 deletion src/dvr/dvr_db.c
Expand Up @@ -388,7 +388,7 @@ dvr_entry_retention_timer(dvr_entry_t *de)
uint32_t retention = dvr_entry_get_retention_days(de);

stop = de->de_stop + removal * (time_t)86400;
if ((removal > 0 || retention == 0) && removal < DVR_RET_SPACENEED) {
if ((removal > 0 || retention == 0) && removal < DVR_RET_SPACENEED) {
if (stop > dispatch_clock) {
dvr_entry_retention_arm(de, dvr_timer_remove_files, stop);
return;
Expand Down
4 changes: 2 additions & 2 deletions src/webui/simpleui.c
Expand Up @@ -336,8 +336,8 @@ page_einfo(http_connection_t *hc, const char *remain, void *opaque)
if((http_arg_get(&hc->hc_req_args, "rec")) != NULL) {
de = dvr_entry_create_by_event(1, NULL, e, 0, 0, hc->hc_username ?: NULL,
hc->hc_representative ?: NULL, NULL,
DVR_PRIO_NORMAL, DVR_RET_DVRCONFIG,
DVR_RET_DVRCONFIG, "simpleui");
DVR_PRIO_NORMAL, DVR_RET_DVRCONFIG,
DVR_RET_DVRCONFIG, "simpleui");
} else if(de != NULL && (http_arg_get(&hc->hc_req_args, "cancel")) != NULL) {
de = dvr_entry_cancel(de, 0);
}
Expand Down

0 comments on commit bba94ab

Please sign in to comment.