Module: sip-router
Branch: master
Commit: c8fa3d8c28d4d1d918b09d0e9dc29ee59bd38928
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=c8fa3d8…
Author: pd <peter.dunkley(a)crocodile-rcs.com>
Committer: pd <peter.dunkley(a)crocodile-rcs.com>
Date: Wed Oct 19 11:48:22 2011 +0100
modules_k/siputils: added has_totag() to exported API for use in app_lua
---
modules_k/siputils/siputils.h | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/modules_k/siputils/siputils.h b/modules_k/siputils/siputils.h
index f9afcf8..b640a25 100644
--- a/modules_k/siputils/siputils.h
+++ b/modules_k/siputils/siputils.h
@@ -24,10 +24,13 @@
#ifndef _SIPUTILS_H_
#define _SIPUTILS_H_
+typedef int (*siputils_has_totag_t)(struct sip_msg*, char*, char*);
+
/*! Siputils module API */
typedef struct siputils_api {
int_str rpid_avp; /*!< Name of AVP containing Remote-Party-ID */
int rpid_avp_type; /*!< type of the RPID AVP */
+ siputils_has_totag_t has_totag;
} siputils_api_t;
typedef int (*bind_siputils_t)(siputils_api_t* api);
@@ -39,4 +42,15 @@ typedef int (*bind_siputils_t)(siputils_api_t* api);
*/
int bind_siputils(siputils_api_t* api);
+inline static int siputils_load_api(siputils_api_t *pxb)
+{
+ bind_siputils_t bind_siputils_exports;
+ if (!(bind_siputils_exports =
(bind_siputils_t)find_export("bind_siputils", 1, 0)))
+ {
+ LM_ERR("Failed to import bind_siputils\n");
+ return -1;
+ }
+ return bind_siputils_exports(pxb);
+}
+
#endif