Module: kamailio
Branch: master
Commit: d11a12502299bf7e6f85505c4b48a4486a647e31
URL: 
https://github.com/kamailio/kamailio/commit/d11a12502299bf7e6f85505c4b48a4486a647e31

Author: Daniel-Constantin Mierla <[email protected]>
Committer: Daniel-Constantin Mierla <[email protected]>
Date: 2021-02-08T11:23:46+01:00

core: added selval(evalexpr, valexp1, valexpr2)

- this is a core statement that return the 2nd parameter if the 1st
parameter is evaluated to true, or 3rd parameter if the 1st parameter is
evaluated to false
- it can be considered a core function that is equivalent of ternary
condition/operator
- example:
  $var(x) = selval($Ts mod 2, "true/" + $ru, "false/" + $rd);
- the first parameter is a conditional expression, like those used for
IF, the 2nd and 3rd parameters can be expressions like those used in the
right side of assignments

---

Modified: src/core/cfg.lex
Modified: src/core/cfg.y
Modified: src/core/rvalue.c
Modified: src/core/rvalue.h

---

Diff:  
https://github.com/kamailio/kamailio/commit/d11a12502299bf7e6f85505c4b48a4486a647e31.diff
Patch: 
https://github.com/kamailio/kamailio/commit/d11a12502299bf7e6f85505c4b48a4486a647e31.patch


_______________________________________________
Kamailio (SER) - Development Mailing List
[email protected]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to