[sr-dev] [kamailio/kamailio] Function sql_xquery returns 1 for empty query result. (Issue #3163)

Daniel-Constantin Mierla notifications at github.com
Fri Jul 1 13:51:27 CEST 2022


Actually, I misread the code and it should return 2, the log:

```
Jun 24 17:14:52 ip-172-31-3-158 /usr/local/sbin/kamailio[49325]: DEBUG: {1 53491654 INVITE 00a98cb1-6e84-123b-fca2-069c0e3bf50e} sqlops [sql_api.c:494]: sql_exec_xquery(): no result after query
```

It is from the file and line:

  - https://github.com/kamailio/kamailio/blob/master/src/modules/sqlops/sql_api.c#L494

It could be the IF evaluation, try:

```
sql_xquery("con", "SELECT * FROM sbc_uacreg WHERE l_uuid = '$hdr(X-Gateway)'", "ra");
if($rc == 1) {
```

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3163#issuecomment-1172262791
You are receiving this because you are subscribed to this thread.

Message ID: <kamailio/kamailio/issues/3163/1172262791 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20220701/aa74c6b1/attachment.htm>


More information about the sr-dev mailing list