Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash with nested $param variables #412

Closed
liviuchircu opened this issue Feb 16, 2015 · 0 comments
Closed

Crash with nested $param variables #412

liviuchircu opened this issue Feb 16, 2015 · 0 comments
Assignees
Labels
Milestone

Comments

@liviuchircu
Copy link
Member

Present in OpenSIPS 1.9+.

route [route_b]
{
    # Evaluating $param(1) leads to infinite recursion!
    xlog("This should not crash: $param(1)\n");
}

route [route_a]
{
    route(route_b, $param(1));
}

route
{
    route(route_a, "test");
    ...
}
@liviuchircu liviuchircu added this to the 1.10 milestone Feb 16, 2015
@liviuchircu liviuchircu self-assigned this Mar 3, 2015
liviuchircu added a commit that referenced this issue Mar 3, 2015
Keep an array with the route parameters of each nesting level. This
makes it possible to access the parameters of previous route()
statements even if they contain $param variables.

Closes #412

(cherry picked from commit f3ed4db)
liviuchircu added a commit that referenced this issue Mar 3, 2015
Keep an array with the route parameters of each nesting level. This
makes it possible to access the parameters of previous route()
statements even if they contain $param variables.

Closes #412

(cherry picked from commit f3ed4db)

Conflicts:
	action.c
	pvar.c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant