Skip to content

Commit

Permalink
Fix index for cams. Closes #198
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr-Dave committed Dec 13, 2024
1 parent 3e28491 commit 4bf8177
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/dbse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -978,9 +978,11 @@ void cls_dbse::filelist_get(std::string sql, vec_files &p_flst)
{
int indx;
if (dbse_open() == false) {
p_flst.clear();
return;
}
if (finish == true) {
p_flst.clear();
return;
}

Expand Down Expand Up @@ -1193,19 +1195,19 @@ void cls_dbse::dbse_edits()

void cls_dbse::dbse_clean()
{
int delcnt, indx;
int delcnt, indx, camindx;
std::string sql, delimit;
struct stat statbuf;
vec_files flst;

for (indx=0;indx<app->cam_cnt;indx++) {
for (camindx=0;camindx<app->cam_cnt;camindx++) {
if (check_exit() == true) {
return;
}

sql = " select * from motionplus ";
sql += " where device_id = ";
sql += std::to_string(app->cam_list[indx]->cfg->device_id);
sql += std::to_string(app->cam_list[camindx]->cfg->device_id);
sql += " order by file_dtl, file_tml;";
filelist_get(sql, flst);

Expand Down

0 comments on commit 4bf8177

Please sign in to comment.