Skip to content

Commit

Permalink
drouting: exported next_routing() to kemi framework
Browse files Browse the repository at this point in the history
(cherry picked from commit 57c14e6)
  • Loading branch information
miconda committed Nov 27, 2017
1 parent b6c1b0e commit eb746c0
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions src/modules/drouting/drouting.c
Expand Up @@ -115,7 +115,7 @@ static int dr_exit(void);
static int do_routing(struct sip_msg *msg, int grp_id);
static int do_routing_0(struct sip_msg *msg, char *str1, char *str2);
static int do_routing_1(struct sip_msg *msg, char *str1, char *str2);
static int use_next_gw(struct sip_msg *msg);
static int use_next_gw(struct sip_msg *msg, char *p1, char *p2);
static int is_from_gw_0(struct sip_msg *msg, char *str1, char *str2);
static int is_from_gw_1(struct sip_msg *msg, char *str1, char *str2);
static int is_from_gw_2(struct sip_msg *msg, char *str1, char *str2);
Expand Down Expand Up @@ -666,7 +666,7 @@ static int do_routing_1(struct sip_msg *msg, char *str1, char *str2)
}


static int use_next_gw(struct sip_msg *msg)
static int ki_next_routing(sip_msg_t *msg)
{
struct usr_avp *avp;
int_str val;
Expand Down Expand Up @@ -699,6 +699,11 @@ static int use_next_gw(struct sip_msg *msg)
return 1;
}

static int use_next_gw(struct sip_msg *msg, char *p1, char *p2)
{
return ki_next_routing(msg);
}

int dr_already_choosen(rt_info_t *rt_info, int *active_gwlist,
int *local_gwlist, int lgw_size, int check)
{
Expand Down Expand Up @@ -1160,6 +1165,16 @@ static sr_kemi_t sr_kemi_drouting_exports[] = {
{ SR_KEMIP_INT, SR_KEMIP_NONE, SR_KEMIP_NONE,
SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
},
{ str_init("drouting"), str_init("next_routing"),
SR_KEMIP_INT, ki_next_routing,
{ SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE,
SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
},
{ str_init("drouting"), str_init("use_next_gw"),
SR_KEMIP_INT, ki_next_routing,
{ SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE,
SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
},
{ str_init("drouting"), str_init("is_from_gw"),
SR_KEMIP_INT, ki_is_from_gw,
{ SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE,
Expand Down

0 comments on commit eb746c0

Please sign in to comment.