Skip to content

Commit

Permalink
kex: setdsturi() hanldes vars params
Browse files Browse the repository at this point in the history
  • Loading branch information
miconda committed Oct 26, 2017
1 parent a6efe6d commit 3f1f706
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
6 changes: 3 additions & 3 deletions src/modules/kex/kex_mod.c
Expand Up @@ -88,8 +88,8 @@ static cmd_export_t cmds[]={
0, ANY_ROUTE },
{"isbflagset", (cmd_function)w_isbflagset, 2,fixup_igp_igp,
0, ANY_ROUTE },
{"setdsturi", (cmd_function)w_setdsturi, 1, 0,
0, ANY_ROUTE },
{"setdsturi", (cmd_function)w_setdsturi, 1, fixup_spve_null,
fixup_free_spve_null, ANY_ROUTE },
{"resetdsturi", (cmd_function)w_resetdsturi, 0, 0,
0, ANY_ROUTE },
{"isdsturiset", (cmd_function)w_isdsturiset, 0, 0,
Expand Down Expand Up @@ -279,4 +279,4 @@ int mod_register(char *path, int *dlflags, void *p1, void *p2)
{
sr_kemi_modules_add(sr_kemi_kex_exports);
return 0;
}
}
15 changes: 8 additions & 7 deletions src/modules/kex/km_core.c
Expand Up @@ -33,16 +33,17 @@

int w_setdsturi(struct sip_msg *msg, char *uri, str *s2)
{
str s;
str suri;

/* todo: fixup */
s.s = uri;
s.len = strlen(uri);
if(fixup_get_svalue(msg, (gparam_t*)uri, &suri)!=0) {
LM_ERR("cannot get the URI parameter\n");
return -1;
}

if(set_dst_uri(msg, &s)!=0)
if(set_dst_uri(msg, &suri)!=0)
return -1;
/* dst_uri changes, so it makes sense to re-use the current uri for
forking */
/* dst_uri changed, so it makes sense to re-use the current uri
* for forking */
ruri_mark_new(); /* re-use uri for serial forking */
return 1;

Expand Down

0 comments on commit 3f1f706

Please sign in to comment.