Skip to content

Commit

Permalink
tmx: Add t_is_request_route() config function
Browse files Browse the repository at this point in the history
Add t_is_request_route() config function.
  • Loading branch information
Stefan Mititelu committed Feb 8, 2016
1 parent adbbe8b commit 98ae491
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions modules/tmx/tmx_mod.c
Expand Up @@ -70,6 +70,7 @@ static int t_flush_flags(struct sip_msg* msg, char*, char* );
static int t_is_failure_route(struct sip_msg* msg, char*, char* );
static int t_is_branch_route(struct sip_msg* msg, char*, char* );
static int t_is_reply_route(struct sip_msg* msg, char*, char*);
static int t_is_request_route(struct sip_msg* msg, char*, char*);

static int w_t_suspend(struct sip_msg* msg, char*, char*);
static int w_t_continue(struct sip_msg* msg, char *idx, char *lbl, char *rtn);
Expand Down Expand Up @@ -191,6 +192,8 @@ static cmd_export_t cmds[]={
0, ANY_ROUTE },
{"t_is_reply_route", (cmd_function)t_is_reply_route, 0, 0,
0, ANY_ROUTE },
{"t_is_request_route", (cmd_function)t_is_request_route, 0, 0,
0, ANY_ROUTE },
{"t_suspend", (cmd_function)w_t_suspend, 0, 0,
0, ANY_ROUTE },
{"t_continue", (cmd_function)w_t_continue, 3,
Expand Down Expand Up @@ -563,6 +566,16 @@ static int t_is_reply_route(struct sip_msg* msg, char *foo, char *bar)
return -1;
}

/**
*
*/
static int t_is_request_route(struct sip_msg* msg, char *foo, char *bar)
{
if(route_type == REQUEST_ROUTE)
return 1;
return -1;
}

/**
*
*/
Expand Down

0 comments on commit 98ae491

Please sign in to comment.