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

[BUG] sql_cacher: improper parsing of "cache_table" #2682

Closed
bogdan-iancu opened this issue Nov 11, 2021 · 5 comments
Closed

[BUG] sql_cacher: improper parsing of "cache_table" #2682

bogdan-iancu opened this issue Nov 11, 2021 · 5 comments
Assignees
Milestone

Comments

@bogdan-iancu
Copy link
Member

The following cache definition is not accepted as valid

modparam("sql_cacher", "cache_table", "id=my_cache
db_url=mysql://opensips:opensipsrw@localhost/opensips
cachedb_url=local:///my_cache
table=my_table
key=my_key
on_demand=0
")

With the error

Nov 11 11:30:39 [3818458] ERROR:sql_cacher:parse_cache_entry: unknown parameter: 
Nov 11 11:30:39 [3818458] WARNING:sql_cacher:parse_cache_entry: invalid cache entry specification for id: my_cache
Nov 11 11:30:39 [3818458] Traceback (last included file at the bottom):
Nov 11 11:30:39 [3818458]  0. /etc/opensips/opensips.cfg
Nov 11 11:30:39 [3818458] CRITICAL:core:yyerror: parse error in /etc/opensips/opensips.cfg:255:2-3: Parameter <cache_table> not found in module <sql_cacher> - can't set

It looks like the last empty line is considered an empty name parameter :-/ . The parser should be more tolerant with such formating deviations (extra lines, extra spaces).

Valid for all versions

@github-actions
Copy link

Any updates here? No progress has been made in the last 15 days, marking as stale. Will close this issue if no further updates are made in the next 30 days.

@github-actions github-actions bot added the stale label Nov 27, 2021
@ar45
Copy link
Contributor

ar45 commented Nov 29, 2021

Still active

I also would like to see this fixed.

@stale stale bot removed the stale label Nov 29, 2021
@github-actions
Copy link

Any updates here? No progress has been made in the last 15 days, marking as stale. Will close this issue if no further updates are made in the next 30 days.

@github-actions github-actions bot added the stale label Dec 15, 2021
@ar45
Copy link
Contributor

ar45 commented Dec 19, 2021 via email

@stale stale bot removed the stale label Dec 19, 2021
@github-actions
Copy link

github-actions bot commented Jan 3, 2022

Any updates here? No progress has been made in the last 15 days, marking as stale. Will close this issue if no further updates are made in the next 30 days.

@github-actions github-actions bot added the stale label Jan 3, 2022
rvlad-patrascu added a commit that referenced this issue Jan 10, 2022
rvlad-patrascu added a commit that referenced this issue Jan 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants