[OpenSIPS-Devel] [PATCH] add find_udomain() to usrloc API

John Khvatov ivaxer at dev.sgu.ru
Thu Apr 9 15:10:58 CEST 2009


Also renamed find_domain() to find_udomain(). This patch for current opensips
upstream.

-- 
John Khvatov

---
 modules/usrloc/dlist.c  |    2 +-
 modules/usrloc/dlist.h  |    3 ++-
 modules/usrloc/usrloc.c |    1 +
 modules/usrloc/usrloc.h |    1 +
 4 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/modules/usrloc/dlist.c b/modules/usrloc/dlist.c
index 23230c7..8ef5d03 100644
--- a/modules/usrloc/dlist.c
+++ b/modules/usrloc/dlist.c
@@ -567,7 +567,7 @@ int synchronize_all_udomains(void)
 /*! \brief
  * Find a particular domain
  */
-int find_domain(str* _d, udomain_t** _p)
+int find_udomain(str* _d, udomain_t** _p)
 {
 	dlist_t* d;
 
diff --git a/modules/usrloc/dlist.h b/modules/usrloc/dlist.h
index dff177c..4da15c3 100644
--- a/modules/usrloc/dlist.h
+++ b/modules/usrloc/dlist.h
@@ -99,7 +99,8 @@ unsigned long get_number_of_users();
 /*! \brief
  * Find a particular domain
  */
-int find_domain(str* _d, udomain_t** _p);
+typedef int(*find_udomain_t) (str* _d, udomain_t** _p);
+int find_udomain(str* _d, udomain_t** _p);
 
 
 #endif /* UDLIST_H */
diff --git a/modules/usrloc/usrloc.c b/modules/usrloc/usrloc.c
index a464f64..2cac118 100644
--- a/modules/usrloc/usrloc.c
+++ b/modules/usrloc/usrloc.c
@@ -60,6 +60,7 @@ int bind_usrloc(usrloc_api_t* api)
 	api->get_urecord        = get_urecord;
 	api->lock_udomain       = lock_udomain;
 	api->unlock_udomain     = unlock_udomain;
+	api->find_udomain       = find_udomain;
 	api->release_urecord    = release_urecord;
 	api->insert_ucontact    = insert_ucontact;
 	api->delete_ucontact    = delete_ucontact;
diff --git a/modules/usrloc/usrloc.h b/modules/usrloc/usrloc.h
index facdbe9..8b58784 100644
--- a/modules/usrloc/usrloc.h
+++ b/modules/usrloc/usrloc.h
@@ -51,6 +51,7 @@ typedef struct usrloc_api {
 	get_urecord_t        get_urecord;
 	lock_udomain_t       lock_udomain;
 	unlock_udomain_t     unlock_udomain;
+	find_udomain_t       find_udomain;
 
 	release_urecord_t    release_urecord;
 	insert_ucontact_t    insert_ucontact;
-- 
1.6.0.6




More information about the Devel mailing list