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

Dialog: Core dump when using dlg_set_timeout #1011

Closed
oej opened this issue Feb 27, 2017 · 5 comments
Closed

Dialog: Core dump when using dlg_set_timeout #1011

oej opened this issue Feb 27, 2017 · 5 comments

Comments

@oej
Copy link
Member

oej commented Feb 27, 2017

dlg_set_timeout("2419200", $var(entry), $var(id));

The both $var's contains strings. If I enclose them with "" there's no segfault, but the var's doesn't seem to be parsed by dlg_set_timeout either.

Doing this causes a seg fault when kamailio starts. Version 4.4.2

Will try to get a core dump, but not sure since this is a production system...

@oej oej added the 4.4 label Feb 27, 2017
@miconda
Copy link
Member

miconda commented Feb 27, 2017

The values in the variables have to be numbers, not strings. Try to convert first with {s.int}, like:

$var(entry) = $(var(entry){s.int});
$var(id) = $(var(id){s.int});
dlg_set_timeout("2419200", "$var(entry)", "$var(id)");

@oej
Copy link
Member Author

oej commented Feb 27, 2017

I did later - but we should not segfault for a bad config, right?

@miconda
Copy link
Member

miconda commented Feb 27, 2017

Sure, that needs to be caught. I tried to suggest a solution for now.

@oej
Copy link
Member Author

oej commented Feb 27, 2017

Thank you! I still can't find the proper dialog, but that's another problem.

miconda added a commit that referenced this issue Mar 13, 2017
miconda added a commit that referenced this issue Mar 13, 2017
miconda added a commit that referenced this issue Mar 13, 2017
- related to GH #1011

(cherry picked from commit 618888c)
miconda added a commit that referenced this issue Mar 14, 2017
- related to GH #1011

(cherry picked from commit 97b3ce7)
(cherry picked from commit fb859b9)
miconda added a commit that referenced this issue Mar 14, 2017
- related to GH #1011

(cherry picked from commit 618888c)
(cherry picked from commit 943a5b2)
@miconda
Copy link
Member

miconda commented Mar 14, 2017

I pushed some commits with safety checks back to 4.4. If the issue is still there, reopen.

@miconda miconda closed this as completed Mar 14, 2017
lbalaceanu pushed a commit to lbalaceanu/kamailio that referenced this issue Mar 16, 2017
lbalaceanu pushed a commit to lbalaceanu/kamailio that referenced this issue Mar 16, 2017
miconda added a commit that referenced this issue Jun 13, 2017
- related to GH #1011

(cherry picked from commit 97b3ce7)
(cherry picked from commit fb859b9)
(cherry picked from commit ab58022)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants