Skip to content

Commit

Permalink
dialog: added auth_check and timeout parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
eseanucristian committed Aug 24, 2015
1 parent e01751d commit 3db517b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 11 additions & 1 deletion modules/dialog/dialog.c
Expand Up @@ -121,6 +121,8 @@ int accept_replicated_dlg=0;
int dialog_replicate_cluster = 0;
int profile_replicate_cluster = 0;
int accept_repl_profiles=0;
int accept_replicated_profile_timeout = 10;
int repl_prof_auth_check = 0;

static int pv_get_dlg_count( struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
Expand Down Expand Up @@ -274,6 +276,8 @@ static param_export_t mod_params[]={
{ "replicate_profiles_buffer",INT_PARAM, &repl_prof_buffer_th },
{ "replicate_profiles_expire",INT_PARAM, &repl_prof_timer_expire},
{ "replicate_profiles_to", INT_PARAM, &profile_replicate_cluster },
{ "accept_replicated_profile_timeout", INT_PARAM, &accept_replicated_profile_timeout},
{ "auth_check", INT_PARAM, &repl_prof_auth_check},
{ 0,0,0 }
};

Expand Down Expand Up @@ -836,8 +840,14 @@ static int mod_init(void)
return -1;
}

if (repl_prof_auth_check < 0)
repl_prof_auth_check = 0;

if (accept_replicated_profile_timeout <= 0)
accept_replicated_profile_timeout = 10;

if(accept_repl_profiles && clusterer_api.register_module("dialog", PROTO_BIN, receive_prof_binary_packet,
10, 1, accept_repl_profiles) < 0){
accept_replicated_profile_timeout, repl_prof_auth_check, accept_repl_profiles) < 0){
LM_ERR("Cannot register binary packet callback!\n");
return -1;
}
Expand Down
2 changes: 2 additions & 0 deletions modules/dialog/dlg_repl_profile.h
Expand Up @@ -51,6 +51,8 @@ typedef struct repl_prof_value {

/* profiles functions */
extern int accept_repl_profiles;
extern int accept_replicated_profile_timeout;
extern int repl_prof_auth_check;
extern int repl_prof_buffer_th;
extern int repl_prof_utimer;
extern int repl_prof_timer_check;
Expand Down

0 comments on commit 3db517b

Please sign in to comment.