### 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/dc59286c26e9799f86e698a9698c9da8.... 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 ```
Can you test with latest master branch? There was a commit pushed to address it in the ctl module. If it works fine, then the commit will be backported.
``` version: kamailio 5.9.0-dev0 (x86_64/linux) 04a73a 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: 04a73a compiled on 13:49:48 Mar 18 2024 with gcc 13.2.1 ``` Tested with the above version (commit 04a73ace6572dd5c95a8f50b39b2ce712f7ebe84), and it no longer gives the 500 error with `htable.seti`:
``` $ kamcmd htable.seti rconfig foo 1 Ok. Key set to new value. $ kamcmd htable.get rconfig foo { item: { name: foo value: 1 flags: 0 expire: NEVER } } ```
Thanks for testing, commits backported to 5.8 and 5.7.
Closed #3774 as completed.