Skip to content

Commit

Permalink
ratelimit: fixed segmentation fault when server_timeout is received
Browse files Browse the repository at this point in the history
  • Loading branch information
eseanucristian committed Aug 24, 2015
1 parent 3db517b commit c52c4e9
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions modules/ratelimit/ratelimit_helper.c
Expand Up @@ -829,15 +829,7 @@ void rl_rcv_bin(int packet_type, struct receive_info *ri, int server_id)
unsigned int hash_idx;
time_t now;
rl_repl_counter_t *destination;

if(get_bin_pkg_version() != BIN_VERSION){
LM_ERR("incompatible bin protocol version\n");
return;
}

if (packet_type != RL_PIPE_COUNTER)
return;


if (packet_type == SERVER_TEMP_DISABLED) {
get_su_info(&ri->src_su.s, ip, port);
LM_WARN("server: %s:%hu temporary disabled\n", ip, port);
Expand All @@ -848,6 +840,14 @@ void rl_rcv_bin(int packet_type, struct receive_info *ri, int server_id)
LM_WARN("server with clustererer id %d timeout\n", server_id);
return;
}

if(get_bin_pkg_version() != BIN_VERSION){
LM_ERR("incompatible bin protocol version\n");
return;
}

if (packet_type != RL_PIPE_COUNTER)
return;

if (packet_type != RL_PIPE_COUNTER)
return;
Expand Down

0 comments on commit c52c4e9

Please sign in to comment.