Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions modules/db_virtual/db_virtual.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
int db_probe_time = 10;

/* max consecutive retries before give up */
int db_max_consec_retrys = 10;
int db_max_consec_retries = 10;

/* for debug.. try_reconect with or without a timer process(probe) */
int db_reconnect_with_timer = 1;
Expand Down Expand Up @@ -95,7 +95,9 @@ static const cmd_export_t cmds[] = {
static const param_export_t params[] = {
//{"db_file", STR_PARAM, &db_file.s},
{"db_probe_time", INT_PARAM, &db_probe_time},
{"db_max_consec_retrys", INT_PARAM, &db_max_consec_retrys},
/* kept for backwards-compatibility */
{"db_max_consec_retrys", INT_PARAM, &db_max_consec_retries},
{"db_max_consec_retries", INT_PARAM, &db_max_consec_retries},
{"db_urls", STR_PARAM|USE_FUNC_PARAM,(void*)store_urls},
{0, 0, 0}
};
Expand Down
8 changes: 4 additions & 4 deletions modules/db_virtual/dbase.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ extern info_global_t* global;
extern handle_private_t* private;

extern int db_reconnect_with_timer;
extern int db_max_consec_retrys;
extern int db_max_consec_retries;

str use_table={0,0};

Expand Down Expand Up @@ -106,7 +106,7 @@ void try_reconnect(handle_set_t * p){
global->set_list[p->set_index].db_list[i].flags & CAN_USE){

if( global->set_list[p->set_index].db_list[i].flags & RERECONNECT){
p->con_list[i].no_retries = db_max_consec_retrys;
p->con_list[i].no_retries = db_max_consec_retries;
}
if(p->con_list[i].no_retries-- > 0){
p->con_list[i].con =
Expand All @@ -125,7 +125,7 @@ void try_reconnect(handle_set_t * p){
p->con_list[i].flags |= CAN_USE;
set_update_flags(i, p);

p->con_list[i].no_retries = db_max_consec_retrys;
p->con_list[i].no_retries = db_max_consec_retries;
}
}
}
Expand Down Expand Up @@ -375,7 +375,7 @@ db_con_t* db_virtual_init(const str* _set_url)
set_update_flags(i, p);

}
p->con_list[i].no_retries = db_max_consec_retrys;
p->con_list[i].no_retries = db_max_consec_retries;
}


Expand Down