Module: sip-router Branch: master Commit: e10ce584c7c6c8fe4a7d2422e92a436f7e8bf27a URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=e10ce584...
Author: pd peter.dunkley@crocodile-rcs.com Committer: pd peter.dunkley@crocodile-rcs.com Date: Wed Oct 19 11:43:34 2011 +0100
modules_k/pua_usrloc: exported API for use in app_lua
---
modules_k/pua_usrloc/pua_usrloc.c | 16 +++++++++++++++- 1 files changed, 15 insertions(+), 1 deletions(-)
diff --git a/modules_k/pua_usrloc/pua_usrloc.c b/modules_k/pua_usrloc/pua_usrloc.c index a84503a..9dcf27e 100644 --- a/modules_k/pua_usrloc/pua_usrloc.c +++ b/modules_k/pua_usrloc/pua_usrloc.c @@ -54,6 +54,7 @@ #include "../usrloc/ul_callback.h" #include "../pua/pua_bind.h" #include "pua_usrloc.h" +#include "api.h"
MODULE_VERSION
@@ -76,7 +77,8 @@ send_subscribe_t pua_send_subscribe;
static cmd_export_t cmds[]= { - {"pua_set_publish", (cmd_function)pua_set_publish, 0, 0, 0, REQUEST_ROUTE}, + {"pua_set_publish", (cmd_function)pua_set_publish, 0, 0, 0, REQUEST_ROUTE}, + {"bind_pua_usrloc", (cmd_function)bind_pua_usrloc, 1, 0, 0, 0}, {0, 0, 0, 0, 0, 0} };
@@ -201,3 +203,15 @@ static int mod_init(void)
return 0; } + +int bind_pua_usrloc(struct pua_usrloc_binds *pxb) +{ + if (pxb == NULL) + { + LM_WARN("bind_pua_usrloc: Cannot load pua_usrloc API into a NULL pointer\n"); + return -1; + } + + pxb->pua_set_publish = pua_set_publish; + return 0; +}