[OpenSIPS-Devel] [OpenSIPS/opensips] 31b6ae: $param variable: Improve behavior on error
Liviu Chircu
noreply at github.com
Mon Feb 17 09:24:15 EST 2020
Branch: refs/heads/3.0
Home: https://github.com/OpenSIPS/opensips
Commit: 31b6ae5d8832b097c4ff0e5adb9799e82d1d37cb
https://github.com/OpenSIPS/opensips/commit/31b6ae5d8832b097c4ff0e5adb9799e82d1d37cb
Author: Liviu Chircu <liviu at opensips.org>
Date: 2020-02-17 (Mon, 17 Feb 2020)
Changed paths:
M action.c
Log Message:
-----------
$param variable: Improve behavior on error
* hint that named params are only allowed within event_route
* throw an error on accessing $param(name) from a route() call
without parameters (i.e. avoid doing a quick-exit, be consistent).
This will help users when migrating to 3.x, since
fetch_event_params() used to work within a simple route.
* skip the redundant "params_no == 0" check, since params is always
NULL when "params_no == 0". Even without this idea, the index
check below will also catch this corner-case.
Thanks to Vlad Paiu for bringing this issue to attention!
(cherry picked from commit 675a10e2fb5115f1c210dd032c3ac120dee82e22)
More information about the Devel
mailing list