### Description
Since 5.7.4, the `htable.seti` RPC command returns error 500. This seems to occur whenever an integer value is passed. If the integer is passed as a decimal (eg. `1.0` or `1.`) the error disappears. Also reproducible with latest master.
### Troubleshooting
Bisecting shows the offending commit to be https://github.com/kamailio/kamailio/commit/dc59286c26e9799f86e698a9698c9da…. Reverting this commit fixes the 500 error but reintroduces the previous error referenced in the commit.
#### Reproduction
```
$ kamcmd htable.seti rconfig foo 1
error: 500 - Not enough parameters (htable name, key name and value)
```
#### Log Messages
No messages in the kamailio log when the error occurs. The RPC command responds with
```
error: 500 - Not enough parameters (htable name, key name and value)
```
### Possible Solutions
A workaround is to pass the value as a decimal value, eg. `1.0`. Any decimals are ignored since the value is treated as an integer.
For XMLRPC this can be worked around by explicitly passing the value as an integer (passing the value as `i/1`).
### Additional Information
```
version: kamailio 5.9.0-dev0 (x86_64/linux) f6f9d9
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, MEM_JOIN_FREE, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLOCKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED
ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_SEND_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: f6f9d9
compiled on 11:57:50 Mar 5 2024 with gcc 13.2.1
```
* **Operating System**:
Reproduced on the following:
```
Linux jon 6.6.2-arch1-1 #1 SMP PREEMPT_DYNAMIC Mon, 20 Nov 2023 23:18:21 +0000 x86_64 GNU/Linux
```
```
Linux ip-10-105-240-190 4.9.0-19-amd64 #1 SMP Debian 4.9.320-2 (2022-06-30) x86_64 GNU/Linux
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3774
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3774(a)github.com>
Module: kamailio
Branch: 5.8
Commit: 7bcef8ef487a713f5b6c6fadb7a3166ed41fb136
URL: https://github.com/kamailio/kamailio/commit/7bcef8ef487a713f5b6c6fadb7a3166…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2024-03-20T13:31:25+01:00
modules: readme files regenerated - modules ... [skip ci]
---
Modified: src/modules/dispatcher/README
---
Diff: https://github.com/kamailio/kamailio/commit/7bcef8ef487a713f5b6c6fadb7a3166…
Patch: https://github.com/kamailio/kamailio/commit/7bcef8ef487a713f5b6c6fadb7a3166…
---
diff --git a/src/modules/dispatcher/README b/src/modules/dispatcher/README
index 79fc82ec175..209d77f4c87 100644
--- a/src/modules/dispatcher/README
+++ b/src/modules/dispatcher/README
@@ -1489,9 +1489,16 @@ if(ds_list_exists("10")) {
ignoring the protocol (value 2). If parameter is 0, all ip, port
and proto are matched and active status is ignored. If bit one is
set, then port is ignored. If bit two is set, then protocol is
- ignored. If bit three is set, then state must be active. The
- parameter can be an integer or a variable holding an integer value.
- It must be provided if the uri parameter is provided.
+ ignored. If bit three is set, then state must be active. If bit
+ four is set, then socket/sockname be matched. If bit five is set,
+ then try to find the most closest target from all dispatcher
+ targets with the mandatory ip and combination of local socket,
+ protocol, port, the weighted search result is combined from bit
+ flags of matched components: ip - 1, port - 2, protocol - 4, local
+ socket - 8, the target with the maximum value of flags combination
+ will be selected. The parameter can be an integer or a variable
+ holding an integer value. It must be provided if the uri parameter
+ is provided.
* uri (optional) - if parameter is empty or missing, the matching is
done against source IP, port and protocol. Otherwise the value has
to be a valid SIP URI, used to match against addresses in the
Module: kamailio
Branch: 5.7
Commit: f654b9c1943be6816827f9048627a7c8a7fe50f6
URL: https://github.com/kamailio/kamailio/commit/f654b9c1943be6816827f9048627a7c…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-03-20T13:26:43+01:00
keepalive: small formatting updates and comments to the ka dest structure
(cherry picked from commit cee82c92b06a026b88fea654944f6146eb5cb4d8)
(cherry picked from commit a7d4ce95b383dc26c547ef9ee07b05d51abc50f9)
---
Modified: src/modules/keepalive/keepalive.h
---
Diff: https://github.com/kamailio/kamailio/commit/f654b9c1943be6816827f9048627a7c…
Patch: https://github.com/kamailio/kamailio/commit/f654b9c1943be6816827f9048627a7c…
---
diff --git a/src/modules/keepalive/keepalive.h b/src/modules/keepalive/keepalive.h
index d5a8fcb2197..5ca1ce3561d 100644
--- a/src/modules/keepalive/keepalive.h
+++ b/src/modules/keepalive/keepalive.h
@@ -69,13 +69,15 @@ typedef struct _ka_initial_dest
typedef struct _ka_dest
{
str uri;
- str owner; // name of destination "owner"
- // (module asking to monitor this destination
- str uuid; // Universal id for this record
+ str owner; /*!< Name of destination "owner" */
+ /*!< Module asking to monitor this destination */
+ str uuid; /*!< Universal id for this record */
int flags;
int state;
- time_t last_checked, last_up, last_down;
- int counter; // counts unreachable attempts
+ time_t last_checked;
+ time_t last_up; /*!< Time of last successful SIP reply */
+ time_t last_down; /*!< Time of last failure SIP reply */
+ int counter; /*!< Counts unreachable attempts */
ticks_t ping_interval; /*!< Actual interval between OPTIONS */
void *user_attr;