Branch data Line data Source code
1 : : #include "precizer.h"
2 : :
3 : : /**
4 : : *
5 : : * Validate the integrity of primary database file
6 : : *
7 : : */
8 : 321 : Return db_primary_file_test(void)
9 : : {
10 : : /* Status returned by this function through provide()
11 : : Default value assumes successful completion */
12 : 321 : Return status = SUCCESS;
13 : :
14 : : /* Interrupt the function smoothly */
15 : : /* Interrupt when Ctrl+C */
16 [ - + ]: 321 : if(global_interrupt_flag == true)
17 : : {
18 : 0 : provide(status);
19 : : }
20 : :
21 : : // The primary database file integrity check
22 [ + + ]: 321 : if(config->db_primary_file_exists == true)
23 : : {
24 [ + - + + ]: 118 : run(db_test(confstr(db_primary_file_path)));
25 : :
26 [ + + ]: 203 : } else if(config->sqlite_open_flag & SQLITE_OPEN_CREATE){
27 : :
28 : 127 : slog(TRACE,"The primary database file was just created and doesn't require verification\n");
29 : :
30 : : }
31 : :
32 : 321 : provide(status);
33 : : }
|