Module: kamailio
Branch: master
Commit: 1b8a1861412ca1457865d292e922f0a579e23b08
URL: 
https://github.com/kamailio/kamailio/commit/1b8a1861412ca1457865d292e922f0a579e23b08

Author: Daniel-Constantin Mierla <mico...@gmail.com>
Committer: Daniel-Constantin Mierla <mico...@gmail.com>
Date: 2025-08-04T22:50:57+02:00

core: helper function to store long value for coreparam

---

Modified: src/core/coreparam.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/1b8a1861412ca1457865d292e922f0a579e23b08.diff
Patch: 
https://github.com/kamailio/kamailio/commit/1b8a1861412ca1457865d292e922f0a579e23b08.patch

---

diff --git a/src/core/coreparam.c b/src/core/coreparam.c
index 1cd9b8030e1..d8e3287c2c7 100644
--- a/src/core/coreparam.c
+++ b/src/core/coreparam.c
@@ -24,6 +24,8 @@
 #include "rand/ksrxrand.h"
 #include "coreparam.h"
 
+int ksr_coreparam_store_nval(str *pname, ksr_cpval_t *pval, void *eparam);
+
 /* clang-format off */
 static ksr_cpexport_t _ksr_cpexports[] = {
        { str_init("random_engine"), KSR_CPTYPE_STR,
@@ -80,3 +82,12 @@ int ksr_coreparam_set_xval(char *name, ksr_cpval_t *xval)
        LM_ERR("core parameter [%.*s] not found\n", sname.len, sname.s);
        return -1;
 }
+
+/**
+ *
+ */
+int ksr_coreparam_store_nval(str *pname, ksr_cpval_t *pval, void *eparam)
+{
+       *(long *)eparam = pval->v.nval;
+       return 0;
+}

_______________________________________________
Kamailio - Development Mailing List -- sr-dev@lists.kamailio.org
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!

Reply via email to