install:upgrade:4.0.x-to-4.1.0
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
install:upgrade:4.0.x-to-4.1.0 [2013/11/15 12:17] – [MySQL - Updates to old database tables] miconda | install:upgrade:4.0.x-to-4.1.0 [2013/12/06 10:25] (current) – [Behaviour] miconda | ||
---|---|---|---|
Line 143: | Line 143: | ||
* **syn_branch** has been removed - core acts now always as syn_branch=0 - the Via header branch value is computed based on transaction attributes | * **syn_branch** has been removed - core acts now always as syn_branch=0 - the Via header branch value is computed based on transaction attributes | ||
+ | * **dns_naptr_ignore_rfc** has been added. Specifies if the Order field in a NAPTR record should be respected. Old code, and still default, is to ignore. | ||
+ | |||
+ | ==== Behaviour ==== | ||
+ | |||
+ | === Comparison with $null === | ||
+ | |||
+ | In short | ||
+ | * now: if($var(a)==$null) is always false | ||
+ | * previous: if($var(a)==$null) was true if $var(a) had the value 0 | ||
+ | |||
+ | **// | ||
+ | |||
+ | **$null** is a special variable that was meant to test if a variable is defined or not (exists or not). It was introduced during Kamailio 1.x series (OpenSER at that time). | ||
+ | |||
+ | For example: | ||
+ | |||
+ | <code c> | ||
+ | if($avp(x)==$null) | ||
+ | </ | ||
+ | |||
+ | Should return true if there was no value assigned to $avp(x). | ||
+ | |||
+ | However, some variables are defined always (eventually initialized to 0), such as $var(a) or $shv(b). | ||
+ | |||
+ | Starting with v3.0.0 when the core from Kamailio point of view was refactored, as part of integration with SER, the comparison with $null mistakenly became the same as comparison with integer 0 (zero). | ||
+ | |||
+ | Some of the comparisons kept working, but some gave wrong result: | ||
+ | |||
+ | <code c> | ||
+ | $avp(x)=0; | ||
+ | if($avp(x)==$null) | ||
+ | </ | ||
+ | |||
+ | was true, but actually $avp(x) was defined, having value 0. | ||
+ | |||
+ | Issue was reported on: | ||
+ | * https:// | ||
+ | |||
+ | |||
+ | **// | ||
+ | |||
+ | Don't compare $var(...) and $shv(...) with $null, they are always defined and initialized to 0. You can eventually compare them with 0 (instead of $null). | ||
+ | |||
+ |
install/upgrade/4.0.x-to-4.1.0.1384517839.txt.gz · Last modified: 2013/11/15 12:17 by miconda