[sr-dev] [kamailio/kamailio] corex.list_sockets broken output (Issue #3799)
### Description I found `corex.list_sockets` does not show the address family (`af`) properly But `core.sockets_list` properly shows the address family (`af`). ### Troubleshooting Reproduction Required to create a config file with content like ``` loadmodule "pv.so" loadmodule "ctl.so" loadmodule "corex.so" listen=udp:127.0.0.1:5060 listen=udp:[::1]:5060 request_route { drop; } ``` Start kamailio and then execute ```sh kamcmd corex.list_sockets ``` The output will be like ``` { af: unknown proto: udp name: 127.0.0.1 addrlist: { addr: 127.0.0.1 } port: 5060 sockstr: udp:127.0.0.1:5060 mcast: no mhomed: no virtual: no sockname: - advertise: - } { af: unknown proto: udp name: ::1 addrlist: { addr: ::1 } port: 5060 sockstr: udp:[::1]:5060 mcast: no mhomed: no virtual: no sockname: - advertise: - } ``` ### Additional Information * **Kamailio Version** - output of `kamailio -v` ``` version: kamailio 5.9.0-dev0 (aarch64/linux) 206399 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-NOSMP, 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: 206399 compiled on 12:57:52 Mar 30 2024 with gcc 8.5.0 ``` * **Operating System**: ``` NAME="CentOS Stream" VERSION="8" ID="centos" ID_LIKE="rhel fedora" VERSION_ID="8" PLATFORM_ID="platform:el8" PRETTY_NAME="CentOS Stream 8" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:centos:centos:8" HOME_URL="https://centos.org/"; BUG_REPORT_URL="https://bugzilla.redhat.com/"; REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux 8" REDHAT_SUPPORT_PRODUCT_VERSION="CentOS Stream" ``` -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/3799 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:master:1c3ae81d: http_client: replaced local fixup with core helpers
Module: kamailio Branch: master Commit: 1c3ae81d904db99de9398d49af1bf6c5f47a4d74 URL: https://github.com/kamailio/kamailio/commit/1c3ae81d904db99de9398d49af1bf6c5f47a4d74 Author: Daniel-Constantin Mierla Committer: Daniel-Constantin Mierla Date: 2024-03-29T23:08:07+01:00 http_client: replaced local fixup with core helpers --- Modified: src/modules/http_client/http_client.c --- Diff: https://github.com/kamailio/kamailio/commit/1c3ae81d904db99de9398d49af1bf6c5f47a4d74.diff Patch: https://github.com/kamailio/kamailio/commit/1c3ae81d904db99de9398d49af1bf6c5f47a4d74.patch ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:master:022da99c: gcrypt: replace local fixups with core helpers
Module: kamailio Branch: master Commit: 022da99ca22efbf226d89234edb3f9883bd89bb2 URL: https://github.com/kamailio/kamailio/commit/022da99ca22efbf226d89234edb3f9883bd89bb2 Author: Daniel-Constantin Mierla Committer: Daniel-Constantin Mierla Date: 2024-03-30T18:24:35+01:00 gcrypt: replace local fixups with core helpers --- Modified: src/modules/gcrypt/gcrypt_mod.c --- Diff: https://github.com/kamailio/kamailio/commit/022da99ca22efbf226d89234edb3f9883bd89bb2.diff Patch: https://github.com/kamailio/kamailio/commit/022da99ca22efbf226d89234edb3f9883bd89bb2.patch --- diff --git a/src/modules/gcrypt/gcrypt_mod.c b/src/modules/gcrypt/gcrypt_mod.c index 69be4432535..c75e6b905b4 100644 --- a/src/modules/gcrypt/gcrypt_mod.c +++ b/src/modules/gcrypt/gcrypt_mod.c @@ -45,10 +45,8 @@ static void mod_destroy(void); static int w_gcrypt_aes_encrypt( sip_msg_t *msg, char *inb, char *keyb, char *outb); -static int fixup_gcrypt_aes_encrypt(void **param, int param_no); static int w_gcrypt_aes_decrypt( sip_msg_t *msg, char *inb, char *keyb, char *outb); -static int fixup_gcrypt_aes_decrypt(void **param, int param_no); /* init vector value */ static str _gcrypt_init_vector = str_init("SIP/2.0 is RFC3261"); @@ -59,9 +57,9 @@ static int _gcrypt_aes_mode = GCRY_CIPHER_MODE_ECB; /* clang-format off */ static cmd_export_t cmds[] = { {"gcrypt_aes_encrypt", (cmd_function)w_gcrypt_aes_encrypt, 3, - fixup_gcrypt_aes_encrypt, 0, ANY_ROUTE}, + fixup_spve2_pvar, fixup_free_spve2_pvar, ANY_ROUTE}, {"gcrypt_aes_decrypt", (cmd_function)w_gcrypt_aes_decrypt, 3, - fixup_gcrypt_aes_decrypt, 0, ANY_ROUTE}, + fixup_spve2_pvar, fixup_free_spve2_pvar, ANY_ROUTE}, {0, 0, 0, 0, 0, 0} }; @@ -260,28 +258,6 @@ static int w_gcrypt_aes_encrypt( return ki_gcrypt_aes_encrypt_helper(msg, &ins, &keys, dst); } -/** - * - */ -static int fixup_gcrypt_aes_encrypt(void **param, int param_no) -{ - if(param_no == 1 || param_no == 2) { - if(fixup_spve_null(param, 1) < 0) - return -1; - return 0; - } else if(param_no == 3) { - if(fixup_pvar_null(param, 1) != 0) { - LM_ERR("failed to fixup result pvar\n"); - return -1; - } - if(((pv_spec_t *)(*param))->setf == NULL) { - LM_ERR("result pvar is not writeble\n"); - return -1; - } - } - return 0; -} - /** * */ @@ -422,28 +398,6 @@ static int w_gcrypt_aes_decrypt( return ki_gcrypt_aes_decrypt_helper(msg, &ins, &keys, dst); } -/** - * - */ -static int fixup_gcrypt_aes_decrypt(void **param, int param_no) -{ - if(param_no == 1 || param_no == 2) { - if(fixup_spve_null(param, 1) < 0) - return -1; - return 0; - } else if(param_no == 3) { - if(fixup_pvar_null(param, 1) != 0) { - LM_ERR("failed to fixup result pvar\n"); - return -1; - } - if(((pv_spec_t *)(*param))->setf == NULL) { - LM_ERR("result pvar is not writeble\n"); - return -1; - } - } - return 0; -} - /** * ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org