[sr-dev] git:master: auth_*(k): updated auth_api and header file name

Andrei Pelinescu-Onciul andrei at iptel.org
Mon Jun 14 18:02:43 CEST 2010


Module: sip-router
Branch: master
Commit: 9d5a273c3cb5509ce1c61de26ed1ef719cbe12a3
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=9d5a273c3cb5509ce1c61de26ed1ef719cbe12a3

Author: Andrei Pelinescu-Onciul <andrei at iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei at iptel.org>
Date:   Mon Jun 14 17:22:01 2010 +0200

auth_*(k): updated auth_api and header file name

Changed auth_api_t to auth_api_k_t and bind_auth to bind_auth_k in
 all the auth(k) using modules.
Updated also the auth/api.h path to contain modules_k (safer if
the modules will be moved).

---

 modules_k/auth_db/authdb_mod.c      |    8 ++++----
 modules_k/auth_db/authdb_mod.h      |    4 ++--
 modules_k/auth_diameter/authorize.c |    2 +-
 modules_k/auth_diameter/authorize.h |    2 +-
 modules_k/auth_radius/authrad_mod.c |    6 +++---
 modules_k/auth_radius/authrad_mod.h |    2 +-
 modules_k/osp/orig_transaction.c    |    2 +-
 modules_k/osp/osp_mod.c             |    8 ++++----
 8 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/modules_k/auth_db/authdb_mod.c b/modules_k/auth_db/authdb_mod.c
index e3df1f5..8459b76 100644
--- a/modules_k/auth_db/authdb_mod.c
+++ b/modules_k/auth_db/authdb_mod.c
@@ -42,7 +42,7 @@
 #include "../../error.h"
 #include "../../mod_fix.h"
 #include "../../mem/mem.h"
-#include "../auth/api.h"
+#include "../../modules_k/auth/api.h"
 #include "../sl/sl_api.h"
 #include "aaa_avps.h"
 #include "authorize.h"
@@ -103,7 +103,7 @@ int use_domain              = 0; /* Use also domain when looking up in table */
 
 db1_con_t* auth_db_handle    = 0; /* database connection handle */
 db_func_t auth_dbf;
-auth_api_t auth_api;
+auth_api_k_t auth_api;
 
 char *credentials_list      = DEFAULT_CRED_LIST;
 struct aaa_avp *credentials = 0; /* Parsed list of credentials to load */
@@ -171,7 +171,7 @@ static int child_init(int rank)
 
 static int mod_init(void)
 {
-	bind_auth_t bind_auth;
+	bind_auth_k_t bind_auth;
 
 	db_url.len = strlen(db_url.s);
 	user_column.len = strlen(user_column.s);
@@ -186,7 +186,7 @@ static int mod_init(void)
 	}
 
 	/* bind to auth module and import the API */
-	bind_auth = (bind_auth_t)find_export("bind_auth", 0, 0);
+	bind_auth = (bind_auth_k_t)find_export("bind_auth_k", 0, 0);
 	if (!bind_auth) {
 		LM_ERR("unable to find bind_auth function. Check if you load the auth module.\n");
 		return -2;
diff --git a/modules_k/auth_db/authdb_mod.h b/modules_k/auth_db/authdb_mod.h
index edb29c0..c9c8452 100644
--- a/modules_k/auth_db/authdb_mod.h
+++ b/modules_k/auth_db/authdb_mod.h
@@ -28,7 +28,7 @@
 
 #include "../../str.h"
 #include "../../lib/srdb1/db.h"
-#include "../auth/api.h"
+#include "../../modules_k/auth/api.h"
 #include "../sl/sl_api.h"
 #include "../../parser/msg_parser.h"
 
@@ -50,7 +50,7 @@ extern int use_domain;        /* If set to 1 then the domain will be used when s
 extern db1_con_t* auth_db_handle; /* database connection handle */
 extern db_func_t auth_dbf;
 
-extern auth_api_t auth_api;
+extern auth_api_k_t auth_api;
 
 extern struct aaa_avp* credentials;
 extern int credentials_n;
diff --git a/modules_k/auth_diameter/authorize.c b/modules_k/auth_diameter/authorize.c
index a8c32d4..71048b6 100644
--- a/modules_k/auth_diameter/authorize.c
+++ b/modules_k/auth_diameter/authorize.c
@@ -58,7 +58,7 @@
 #include "diameter_msg.h"
 #include "auth_diameter.h"
 #include "defs.h"
-#include "../auth/api.h"
+#include "../../modules_k/auth/api.h"
 #include "authorize.h"
 #include "tcp_comm.h"
 
diff --git a/modules_k/auth_diameter/authorize.h b/modules_k/auth_diameter/authorize.h
index c3f96fb..a960436 100644
--- a/modules_k/auth_diameter/authorize.h
+++ b/modules_k/auth_diameter/authorize.h
@@ -35,7 +35,7 @@
 #include "../../parser/hf.h"
 #include "../../pvar.h"
 #include "../../str.h"
-#include "../auth/api.h"
+#include "../../modules_k/auth/api.h"
 #include "defs.h"
 
 int get_uri(struct sip_msg* m, str** uri);
diff --git a/modules_k/auth_radius/authrad_mod.c b/modules_k/auth_radius/authrad_mod.c
index 803948a..c0feb97 100644
--- a/modules_k/auth_radius/authrad_mod.c
+++ b/modules_k/auth_radius/authrad_mod.c
@@ -52,7 +52,7 @@ struct attr attrs[A_MAX+MAX_EXTRA];
 struct val vals[V_MAX+MAX_EXTRA];
 void *rh;
 
-auth_api_t auth_api;
+auth_api_k_t auth_api;
 
 static int mod_init(void);         /* Module initialization function */
 static int auth_fixup(void** param, int param_no); /* char* -> str* */
@@ -120,7 +120,7 @@ struct module_exports exports = {
 static int mod_init(void)
 {
 	DICT_VENDOR *vend;
-	bind_auth_t bind_auth;
+	bind_auth_k_t bind_auth;
 	int n;
 
 	if ((rh = rc_read_config(radius_config)) == NULL) {
@@ -133,7 +133,7 @@ static int mod_init(void)
 		return -2;
 	}
 
-	bind_auth = (bind_auth_t)find_export("bind_auth", 0, 0);
+	bind_auth = (bind_auth_k_t)find_export("bind_auth_k", 0, 0);
 	if (!bind_auth) {
 		LM_ERR("unable to find bind_auth function. Check if you load the auth module.\n");
 		return -1;
diff --git a/modules_k/auth_radius/authrad_mod.h b/modules_k/auth_radius/authrad_mod.h
index 50b9940..a5aaa8e 100644
--- a/modules_k/auth_radius/authrad_mod.h
+++ b/modules_k/auth_radius/authrad_mod.h
@@ -41,6 +41,6 @@ extern struct extra_attr *auth_extra;
 
 extern int use_ruri_flag;
 
-extern auth_api_t auth_api;
+extern auth_api_k_t auth_api;
 
 #endif /* AUTHRAD_MOD_H */
diff --git a/modules_k/osp/orig_transaction.c b/modules_k/osp/orig_transaction.c
index e50b9f2..ef9313d 100644
--- a/modules_k/osp/orig_transaction.c
+++ b/modules_k/osp/orig_transaction.c
@@ -33,7 +33,7 @@
 #include "../../dset.h"
 #include "../../usr_avp.h"
 #include "../../mem/mem.h"
-#include "../auth/api.h"
+#include "../../modules_k/auth/api.h"
 #include "orig_transaction.h"
 #include "destination.h"
 #include "osptoolkit.h"
diff --git a/modules_k/osp/osp_mod.c b/modules_k/osp/osp_mod.c
index ee710b5..d7f9587 100644
--- a/modules_k/osp/osp_mod.c
+++ b/modules_k/osp/osp_mod.c
@@ -34,7 +34,7 @@
 
 #include <osp/osp.h>
 #include "../rr/api.h"
-#include "../auth/api.h"
+#include "../../modules_k/auth/api.h"
 #include "osp_mod.h"
 #include "orig_transaction.h"
 #include "term_transaction.h"
@@ -72,7 +72,7 @@ extern unsigned short _osp_snid_avptype;
 extern OSPTPROVHANDLE _osp_provider;
 
 struct rr_binds osp_rr;
-auth_api_t osp_auth;
+auth_api_k_t osp_auth;
 int osp_index[OSP_DEF_SPS];
 
 static int ospInitMod(void);
@@ -167,7 +167,7 @@ struct module_exports exports = {
  */
 static int ospInitMod(void)
 {
-    bind_auth_t bind_auth;
+    bind_auth_k_t bind_auth;
 
     if (ospVerifyParameters() != 0) {
         /* At least one parameter incorrect -> error */
@@ -182,7 +182,7 @@ static int ospInitMod(void)
     }
 
     /* Load the AUTH API */
-    bind_auth = (bind_auth_t)find_export("bind_auth", 0, 0);
+    bind_auth = (bind_auth_k_t)find_export("bind_auth_k", 0, 0);
     if ((bind_auth == NULL) || (bind_auth(&osp_auth) != 0)) {
         LM_WARN("failed to load the AUTH API. Check if you load the auth module.\n");
         LM_WARN("rpid_avp & rpid_avp_type is required for calling number translation\n");




More information about the sr-dev mailing list