Module: sip-router
Branch: mariuszbihlei/p_usrloc
Commit: 74d276844561298b67edb9b56fed7e1f52ffe3ad
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=74d2768…
Author: Marius Zbihlei <marius.zbihlei(a)1and1.ro>
Committer: Marius Zbihlei <marius.zbihlei(a)1and1.ro>
Date: Thu Jan 6 15:18:10 2011 +0200
Compleated interface of module.
---
modules_k/p_usrloc/dlist.c | 10 ++++++++--
modules_k/p_usrloc/dlist.h | 3 +++
modules_k/p_usrloc/usrloc.c | 3 ++-
3 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/modules_k/p_usrloc/dlist.c b/modules_k/p_usrloc/dlist.c
index f91a2d6..baecd59 100644
--- a/modules_k/p_usrloc/dlist.c
+++ b/modules_k/p_usrloc/dlist.c
@@ -142,11 +142,17 @@ int register_udomain(const char *name, udomain_t **domain) {
unsigned long get_number_of_users(void)
{
int numberOfUsers = 0;
- LM_INFO("not available with sp-ul_db interface");
+ LM_INFO("not available with partitioned interface");
return numberOfUsers;
}
+int get_all_ucontacts(void *buf, int len, unsigned int flags,
+ unsigned int part_idx, unsigned int part_max)
+{
+ LM_INFO("not available with partitioned interface");
+ return -1;
+}
/*!
* \brief Run timer handler of all domains
* \return 0 if all timer return 0, != 0 otherwise
@@ -154,7 +160,7 @@ unsigned long get_number_of_users(void)
int synchronize_all_udomains(void)
{
int res = 0;
- LM_INFO("not available with sp-ul_db interface");
+ LM_INFO("not available with partitioned interface");
return res;
}
diff --git a/modules_k/p_usrloc/dlist.h b/modules_k/p_usrloc/dlist.h
index 5afa429..bbd3588 100644
--- a/modules_k/p_usrloc/dlist.h
+++ b/modules_k/p_usrloc/dlist.h
@@ -71,6 +71,9 @@ void free_all_udomains(void);
typedef int (*get_all_ucontacts_t) (void* buf, int len, unsigned int flags,
unsigned int part_idx, unsigned int part_max);
+int get_all_ucontacts(void *, int, unsigned int,
+ unsigned int part_idx, unsigned int part_max);
+
/*!
* \brief Run timer handler of all domains
* \return 0 if all timer return 0, != 0 otherwise
diff --git a/modules_k/p_usrloc/usrloc.c b/modules_k/p_usrloc/usrloc.c
index e366ede..67e79bc 100644
--- a/modules_k/p_usrloc/usrloc.c
+++ b/modules_k/p_usrloc/usrloc.c
@@ -54,7 +54,7 @@ int bind_usrloc(usrloc_api_t* api)
LM_ERR("invalid parameter value\n");
return -1;
}
- LM_ERR("BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB\n");
+
if (init_flag==0) {
LM_ERR("configuration error - trying to bind to usrloc module"
" before being initialized\n");
@@ -62,6 +62,7 @@ int bind_usrloc(usrloc_api_t* api)
}
api->register_udomain = register_udomain;
+ api->get_all_ucontacts = get_all_ucontacts;
api->insert_urecord = insert_urecord;
api->delete_urecord = delete_urecord;
api->get_urecord = get_urecord;