Skip to content
Permalink
Browse files

kex: setdsturi() hanldes vars params

  • Loading branch information...
miconda committed Oct 26, 2017
1 parent a6efe6d commit 3f1f706b8b1fa5da9da56420d069fc231dd9d784
Showing with 11 additions and 10 deletions.
  1. +3 −3 src/modules/kex/kex_mod.c
  2. +8 −7 src/modules/kex/km_core.c
@@ -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,
@@ -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;
}
}
@@ -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;

0 comments on commit 3f1f706

Please sign in to comment.
You can’t perform that action at this time.