diff --git a/build-aux/version.sh b/build-aux/version.sh index f6663a992..b90d1355d 100755 --- a/build-aux/version.sh +++ b/build-aux/version.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # This file is used by autoconf to generate the version string. # It is assumed that this script is run from the top-level srcdir. EXE=$0 diff --git a/module/tape/recorder.cpp b/module/tape/recorder.cpp index 02a75bf43..b1b252ae5 100644 --- a/module/tape/recorder.cpp +++ b/module/tape/recorder.cpp @@ -113,6 +113,13 @@ static int recorder_open(OBJECT *obj) gl_error("invalid interval value (%d)", my->interval); return 0; } + char buffer[1024]; + int minimum_timestep = atoi(gl_global_getvar("minimum_timestep",buffer,sizeof(buffer)-1)); + if ( minimum_timestep > 0 && my->interval > 0 && my->interval < minimum_timestep ) + { + gl_warning("%s interval %d is less than minimum timestep, setting interval to %d", obj->name?obj->name:"(unnamed)", obj->id, my->interval, minimum_timestep); + my->interval = minimum_timestep; + } /* if no filename given */ if (strcmp(my->file,"")==0)