Skip to content

Commit

Permalink
kazoo : fix routing of reply events
Browse files Browse the repository at this point in the history
success events should be routed to onreply_route[]
failure events should be routed to failure_route[]
  • Loading branch information
kageds authored and miconda committed Aug 16, 2021
1 parent 22a72f3 commit fb2eee3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/modules/kazoo/kz_amqp.c
Expand Up @@ -2498,24 +2498,24 @@ void kz_amqp_fire_connection_event(char *event, char* host, char* zone)

void kz_amqp_cb_ok(kz_amqp_cmd_ptr cmd)
{
int n = route_lookup(&main_rt, cmd->cb_route);
int n = route_lookup(&onreply_rt, cmd->cb_route);
if(n==-1) {
/* route block not found in the configuration file */
return;
}
struct action *a = main_rt.rlist[n];
struct action *a = onreply_rt.rlist[n];
tmb.t_continue(cmd->t_hash, cmd->t_label, a);
ksr_msg_env_reset();
}

void kz_amqp_cb_error(kz_amqp_cmd_ptr cmd)
{
int n = route_lookup(&main_rt, cmd->err_route);
int n = route_lookup(&failure_rt, cmd->err_route);
if(n==-1) {
/* route block not found in the configuration file */
return;
}
struct action *a = main_rt.rlist[n];
struct action *a = failure_rt.rlist[n];
tmb.t_continue(cmd->t_hash, cmd->t_label, a);
ksr_msg_env_reset();
}
Expand Down

0 comments on commit fb2eee3

Please sign in to comment.