Skip to content

Commit

Permalink
dialplan: fix dp_replace() in cmd_export_t struct
Browse files Browse the repository at this point in the history
In the struct 'int param_no' is set to '2'. But dp_replace() has actually three
parameters (dpid, inval, outvar), so kamailio's cfg parser fails when
dp_replace() is called:

yyparse(): cfg. parser: failed to find command dp_replace (params 3)
yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 366, column 45: unknown command, missing loadmodule?

This commit fixes 'int param_no' to address this.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
  • Loading branch information
micmac1 committed Nov 2, 2018
1 parent 2159e7b commit cbff359
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules/dialplan/dialplan.c
Expand Up @@ -115,7 +115,7 @@ static cmd_export_t cmds[]={
ANY_ROUTE},
{"dp_match",(cmd_function)w_dp_match, 2, fixup_igp_spve,
fixup_free_igp_spve, ANY_ROUTE},
{"dp_replace",(cmd_function)w_dp_replace, 2, dp_replace_fixup,
{"dp_replace",(cmd_function)w_dp_replace, 3, dp_replace_fixup,
dp_replace_fixup_free, ANY_ROUTE},
{0,0,0,0,0,0}
};
Expand Down

0 comments on commit cbff359

Please sign in to comment.