AmendHub

Download:

jcs

/

subtext

/

amendments

/

319

session: In session_purge_logs, just write map when done

Rather than trying to be clever and supply FLAG_PURGE to the last
deletion

jcs made amendment 319 about 1 year ago
--- session.c Wed Feb 22 22:30:13 2023 +++ session.c Thu Feb 23 14:49:12 2023 @@ -1628,11 +1628,9 @@ session_purge_logs(short days) if (count) { logger_printf("[db] Deleting %ld of %ld log entries", count, n); - for (n = 0; n < count - 1; n++) { + for (n = 0; n < count; n++) bile_delete(db->sessions_bile, SL_LOG_RTYPE, ids[n], 0); - } - bile_delete(db->sessions_bile, SL_LOG_RTYPE, ids[count - 1], - BILE_DELETE_FLAG_PURGE); + bile_write_map(db->sessions_bile); } if (ids)