[OpenSIPS-Devel] [OpenSIPS/opensips] 675a10: $param variable: Improve behavior on error

Liviu Chircu noreply at github.com
Mon Feb 17 09:23:39 EST 2020


  Branch: refs/heads/master
  Home:   https://github.com/OpenSIPS/opensips
  Commit: 675a10e2fb5115f1c210dd032c3ac120dee82e22
      https://github.com/OpenSIPS/opensips/commit/675a10e2fb5115f1c210dd032c3ac120dee82e22
  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!





More information about the Devel mailing list