Using std::fstream for file I/O at every file access in FileContext.
Reworked file opening/closing to happen on each file chunk
read/write, so that a file isn’t left open in case of an error
or transfer cancelation.
Separeted RxID and TxID for reliable cancelation of stalled xfers.
Increasd io stream buffers:
- 64kB for big files with short lifetime scope
- 16kB for big files with long lifetime scope
- 1kB - dont changes default forr the rest
Added dumps rotation. Maximum count of the files set to 5.
The oldest dumps are removed if there're more than 5 of them.
Comparison is taken by the date.
Unified log and crash dumps rotators.
Split module-utils into smaller components for better dependency
management. Fix many dependencies throughout the project.
Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
Changed:
- Runtime disabled logs which didn't add value from ServiceDesktop
- Runtime disabled logs which didn't add value from SystemManager
- Added possibility to change runtime logging levels
- Integrated ServiceDesktop developer code a bit - it might be used
as virtual base with little to no modifications for other endpoints
which would result with less redundant code
- Removed not used files from old implementations.
- Renamed some classes to follow naming convention.
- Renamed methods to use consistent styling.
- Restructured code.
Added HSP ring sound on incoming call event while
there's bluetooth connection active and HSP is
selected as the current profile.
Possibility of pick up/decline the call using
BT device buttons added.
Slightly changed HSP initialization according
to the UML-s added.
Changed call hangup handler in service cellular.
- Dump logs to file every 10 sec.
- max file size is 50 MB
(after reaching it, no more logs will be logged),
- Add `LockGuard` with locking mechanism
supporting IRQ and use it in `Logger`.
- Fix minor style issues in `Logger`.
- Add `mount_user_lfs_partition.py` script for mounting LFS on Linux FS
in order to get `MuditaOS.log` file from `user` partition
Because `vsnprintf` return value means:
"
The number of characters that would have been
written if n had been sufficiently large,
not counting the terminating null character.
If an encoding error occurs, a negative number is returned.
"
`Logger` crashed when log msg was longer than LOGGER_BUFFER_SIZE.
Checking `vsnprintf` return value solves this issue.