Line data Source code
1 : #include "precizer.h"
2 :
3 : /**
4 : *
5 : * Validate the integrity of primary database file
6 : *
7 : */
8 198 : Return db_primary_file_test(void)
9 : {
10 : /// The status that will be passed to return() before exiting.
11 : /// By default, the function worked without errors.
12 198 : Return status = SUCCESS;
13 :
14 : /* Interrupt the function smoothly */
15 : /* Interrupt when Ctrl+C */
16 198 : if(global_interrupt_flag == true)
17 : {
18 0 : provide(status);
19 : }
20 :
21 : // The primary database file integrity check
22 198 : if(config->db_primary_file_exists == true)
23 : {
24 82 : run(db_test(config->db_primary_file_path));
25 :
26 116 : } else if(config->sqlite_open_flag & SQLITE_OPEN_CREATE){
27 :
28 80 : slog(TRACE,"The primary database file was just created and doesn't require verification\n");
29 :
30 : }
31 :
32 198 : provide(status);
33 : }
|