[sr-dev] [kamailio/kamailio] alias_db_lookup is returning `-1` if result is not found. Documentation implies it should return false. (#2517)

Ben Kaufman notifications at github.com
Mon Oct 19 20:50:52 CEST 2020


Is my problem with the use of the negation operator?  Or should I be calling the function in the condition instead of assigning to a variable and then evaluating the variable?

```
$vn(alias_found) = alias_db_lookup("DbAliases");
if ( !$vn(alias_found) ) {
    ## I would expect this to execute if no alias is found.
   return;
}
## I would expect to reach here if the alias is found.
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2517#issuecomment-712372979
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20201019/13b3f39f/attachment.htm>


More information about the sr-dev mailing list