[sr-dev] git:master:83a8c977: topos: api functions to get dialog and branch expire values

Daniel-Constantin Mierla miconda at gmail.com
Thu Mar 2 16:41:45 CET 2017


Module: kamailio
Branch: master
Commit: 83a8c97798d9dbac7e67203e4a246b6013503c01
URL: https://github.com/kamailio/kamailio/commit/83a8c97798d9dbac7e67203e4a246b6013503c01

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2017-03-02T15:12:05+01:00

topos: api functions to get dialog and branch expire values

---

Modified: src/modules/topos/api.h
Modified: src/modules/topos/topos_mod.c

---

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

---

diff --git a/src/modules/topos/api.h b/src/modules/topos/api.h
index 1e27416..ab36672 100644
--- a/src/modules/topos/api.h
+++ b/src/modules/topos/api.h
@@ -56,12 +56,16 @@ typedef struct tps_storage_api {
 typedef int (*tps_set_storage_api_f)(tps_storage_api_t *tsa);
 int tps_set_storage_api(tps_storage_api_t *tsa);
 
+typedef int (*tps_get_dialog_expire_f)(void);
+typedef int (*tps_get_branch_expire_f)(void);
 
 /**
  * @brief TOPOS API structure
  */
 typedef struct topos_api {
 	tps_set_storage_api_f set_storage_api;
+	tps_get_dialog_expire_f get_dialog_expire;
+	tps_get_branch_expire_f get_branch_expire;
 } topos_api_t;
 
 typedef int (*bind_topos_f)(topos_api_t* api);
diff --git a/src/modules/topos/topos_mod.c b/src/modules/topos/topos_mod.c
index 7e33605..14297f7 100644
--- a/src/modules/topos/topos_mod.c
+++ b/src/modules/topos/topos_mod.c
@@ -383,6 +383,22 @@ int tps_msg_sent(void *data)
 /**
  *
  */
+int tps_get_dialog_expire(void)
+{
+	return _tps_dialog_expire;
+}
+
+/**
+ *
+ */
+int tps_get_branch_expire(void)
+{
+	return _tps_branch_expire;
+}
+
+/**
+ *
+ */
 int bind_topos(topos_api_t *api)
 {
 	if (!api) {
@@ -391,6 +407,8 @@ int bind_topos(topos_api_t *api)
 	}
 	memset(api, 0, sizeof(topos_api_t));
 	api->set_storage_api = tps_set_storage_api;
+	api->get_dialog_expire = tps_get_dialog_expire;
+	api->get_branch_expire = tps_get_branch_expire;
 
 	return 0;
 }




More information about the sr-dev mailing list