Enhancements - stop command

- Implemented stop command
- Fixed bug in TDB that failed to truncate the pending file on
  update.
This commit is contained in:
Paul Beckingham 2009-06-15 23:59:56 -04:00
parent 1551362d1e
commit 41e137a92c
3 changed files with 31 additions and 13 deletions

View file

@ -312,8 +312,11 @@ int TDB::commit ()
// Write out all pending.
if (fseek (mLocations[0].pending, 0, SEEK_SET) == 0)
{
ftruncate (fileno (mLocations[0].pending), 0);
foreach (task, mPending)
fputs (task->composeF4 ().c_str (), mLocations[0].pending);
}
}
return quantity;