Skip to content
Snippets Groups Projects
Commit 2d1481c8 authored by Keith Thorne's avatar Keith Thorne
Browse files

Bug 1010: protect filesys.hh from divide-by-zero if num_dir is 0

git-svn-id: https://redoubt.ligo-wa.caltech.edu/svn/advLigoRTS/trunk@4209 6dcd42c9-f523-4c6d-aada-af552506706e
parent a40b09bb
No related branches found
No related tags found
No related merge requests found
==================================================================================================
Changes for X.X
==================================================================================================
- Bug Fix (472): Better framewriter error messages
- Bug Fix (985): Fix daqd for single-machine framebuilder in kernel 3.2
- Bug Fix (1010): Prevent divide-by-zero error in daqd filesys.hh
==================================================================================================
Changes for 3.0.2
==================================================================================================
- Bug Fix to SUM.pm part connection checking.
- Bug Fix to auto-generated ADC monitor screens. Screens for models which use several top level
signal names were not being generated correctly.
- Bug Fix (472): Better framewriter error messages
- Bug Fix (985): Fix daqd for single-machine framebuilder in kernel 3.2
==================================================================================================
Changes for 3.0.1
==================================================================================================
......
......@@ -395,8 +395,13 @@ static const int digits_in_dir = 5;
dnum = cur_update_dir;
// Switch to the next directory if current directory is full
if (dir [cur_update_dir].nfiles >= files_per_dir)
++dnum %= num_dirs;
if (dir [cur_update_dir].nfiles >= files_per_dir) {
if ( num_dirs > 0 ) {
++dnum %= num_dirs;
} else {
++dnum;
}
}
}
if (gps_time_dirs) {
......@@ -445,8 +450,13 @@ if (gps_time_dirs) {
dnum = cur_update_dir;
// Switch to the next directory if current directory is full
if (dir [cur_update_dir].nfiles >= files_per_dir)
++dnum %= num_dirs;
if (dir [cur_update_dir].nfiles >= files_per_dir) {
if ( num_dirs > 0 ) {
++dnum %= num_dirs;
} else {
++dnum;
}
}
}
_filename_dir (t, fname, dnum, framedt);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment