git:master:a75ab7d2: cfgutils: exported abort and mem functions to kemi framework

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

git:master:a75ab7d2: cfgutils: exported abort and mem functions to kemi framework

Daniel-Constantin Mierla-6
Module: kamailio
Branch: master
Commit: a75ab7d254dd3a2d0b5ab6e2872068cb6bb26082
URL: https://github.com/kamailio/kamailio/commit/a75ab7d254dd3a2d0b5ab6e2872068cb6bb26082

Author: Daniel-Constantin Mierla <[hidden email]>
Committer: Daniel-Constantin Mierla <[hidden email]>
Date: 2017-06-17T22:32:00+02:00

cfgutils: exported abort and mem functions to kemi framework

---

Modified: src/modules/cfgutils/cfgutils.c

---

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

---

diff --git a/src/modules/cfgutils/cfgutils.c b/src/modules/cfgutils/cfgutils.c
index e4560f7226..571ff3b71d 100644
--- a/src/modules/cfgutils/cfgutils.c
+++ b/src/modules/cfgutils/cfgutils.c
@@ -647,30 +647,61 @@ static int dbg_abort(struct sip_msg* msg, char* foo, char* bar)
  return 0;
 }
 
+static int ki_abort(sip_msg_t* msg)
+{
+ LM_CRIT("abort called\n");
+ abort();
+ return 0;
+}
+
 static int dbg_pkg_status(struct sip_msg* msg, char* foo, char* bar)
 {
  pkg_status();
  return 1;
 }
 
+static int ki_pkg_status(sip_msg_t* msg)
+{
+ pkg_status();
+ return 1;
+}
+
 static int dbg_shm_status(struct sip_msg* msg, char* foo, char* bar)
 {
  shm_status();
  return 1;
 }
 
+static int ki_shm_status(sip_msg_t* msg)
+{
+ shm_status();
+ return 1;
+}
+
 static int dbg_pkg_summary(struct sip_msg* msg, char* foo, char* bar)
 {
  pkg_sums();
  return 1;
 }
 
+static int ki_pkg_summary(sip_msg_t* msg)
+{
+ pkg_sums();
+ return 1;
+}
+
 static int dbg_shm_summary(struct sip_msg* msg, char* foo, char* bar)
 {
  shm_sums();
  return 1;
 }
 
+static int ki_shm_summary(sip_msg_t* msg)
+{
+ shm_sums();
+ return 1;
+}
+
 static int cfg_lock_helper(str *lkey, int mode)
 {
  unsigned int pos;
@@ -967,6 +998,31 @@ static sr_kemi_t sr_kemi_cfgutils_exports[] = {
  { SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE,
  SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
  },
+ { str_init("cfgutils"), str_init("abort"),
+ SR_KEMIP_INT, ki_abort,
+ { SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE,
+ SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
+ },
+ { str_init("cfgutils"), str_init("pkg_status"),
+ SR_KEMIP_INT, ki_pkg_status,
+ { SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE,
+ SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
+ },
+ { str_init("cfgutils"), str_init("shm_status"),
+ SR_KEMIP_INT, ki_shm_status,
+ { SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE,
+ SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
+ },
+ { str_init("cfgutils"), str_init("pkg_summary"),
+ SR_KEMIP_INT, ki_pkg_summary,
+ { SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE,
+ SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
+ },
+ { str_init("cfgutils"), str_init("shm_summary"),
+ SR_KEMIP_INT, ki_shm_summary,
+ { SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE,
+ SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
+ },
 
  { {0, 0}, {0, 0}, 0, NULL, { 0, 0, 0, 0, 0, 0 } }
 };


_______________________________________________
Kamailio (SER) - Development Mailing List
[hidden email]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Loading...