Module: sip-router Branch: master Commit: 5e4d570b5d469203303f0f27c5aef3d768001aaf URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=5e4d570b...
Author: Andrei Pelinescu-Onciul andrei@iptel.org Committer: Andrei Pelinescu-Onciul andrei@iptel.org Date: Mon Jun 14 17:25:05 2010 +0200
auth_*(s): updated auth_api and header file name
Changed auth_api_t to auth_api_s_t and bind_auth to bind_auth_s in all the auth(s) using modules. Updated also the auth/api.h path to contain modules_s (safer if the modules will be moved).
---
modules_s/auth_db/authdb_mod.c | 8 ++++---- modules_s/auth_db/authdb_mod.h | 4 ++-- modules_s/auth_radius/authorize.c | 2 +- modules_s/auth_radius/authrad_mod.c | 6 +++--- modules_s/auth_radius/authrad_mod.h | 4 ++-- modules_s/auth_radius/sterman.c | 2 +- modules_s/osp/orig_transaction.c | 4 ++-- 7 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/modules_s/auth_db/authdb_mod.c b/modules_s/auth_db/authdb_mod.c index 99747a2..227420c 100644 --- a/modules_s/auth_db/authdb_mod.c +++ b/modules_s/auth_db/authdb_mod.c @@ -45,7 +45,7 @@ #include "../../mem/mem.h" #include "authorize.h" #include "../auth/aaa_avps.h" -#include "../auth/api.h" +#include "../../modules_s/auth/api.h" #include "authdb_mod.h"
MODULE_VERSION @@ -106,7 +106,7 @@ int use_did = 0; int check_all = 0;
db_ctx_t* auth_db_handle = 0; /* database connection handle */ -auth_api_t auth_api; +auth_api_s_t auth_api;
str credentials_list = STR_STATIC_INIT(DEFAULT_CRED_LIST);
@@ -262,11 +262,11 @@ err:
static int mod_init(void) { - bind_auth_t bind_auth; + bind_auth_s_t bind_auth;
DBG("auth_db module - initializing\n");
- bind_auth = (bind_auth_t)find_export("bind_auth", 0, 0); + bind_auth = (bind_auth_s_t)find_export("bind_auth_s", 0, 0); if (!bind_auth) { LOG(L_ERR, "auth_db:mod_init: Unable to find bind_auth function\n"); return -1; diff --git a/modules_s/auth_db/authdb_mod.h b/modules_s/auth_db/authdb_mod.h index 7715045..95f6a80 100644 --- a/modules_s/auth_db/authdb_mod.h +++ b/modules_s/auth_db/authdb_mod.h @@ -33,7 +33,7 @@
#include "../../str.h" #include "../../lib/srdb2/db.h" -#include "../auth/api.h" +#include "../../modules_s/auth/api.h" #include "../sl/sl.h" #include "../../parser/msg_parser.h"
@@ -56,7 +56,7 @@ extern int check_all; /* if set to 1, multiple db entries are checked */
extern db_ctx_t* auth_db_handle; /* database connection handle */
-extern auth_api_t auth_api; +extern auth_api_s_t auth_api;
extern str* credentials; extern int credentials_n; diff --git a/modules_s/auth_radius/authorize.c b/modules_s/auth_radius/authorize.c index 1b88a5f..9099303 100644 --- a/modules_s/auth_radius/authorize.c +++ b/modules_s/auth_radius/authorize.c @@ -45,7 +45,7 @@ #include "../../dprint.h" #include "../../id.h" #include "../../ut.h" -#include "../auth/api.h" +#include "../../modules_s/auth/api.h" #include "authorize.h" #include "sterman.h" #include "authrad_mod.h" diff --git a/modules_s/auth_radius/authrad_mod.c b/modules_s/auth_radius/authrad_mod.c index a0fa668..0cd403b 100644 --- a/modules_s/auth_radius/authrad_mod.c +++ b/modules_s/auth_radius/authrad_mod.c @@ -58,7 +58,7 @@ struct attr attrs[A_MAX]; struct val vals[V_MAX]; void *rh;
-auth_api_t auth_api; +auth_api_s_t auth_api;
static int mod_init(void); /* Module initialization function */
@@ -119,7 +119,7 @@ struct module_exports exports = { static int mod_init(void) { DICT_VENDOR *vend; - bind_auth_t bind_auth; + bind_auth_s_t bind_auth;
DBG("auth_radius - Initializing\n");
@@ -182,7 +182,7 @@ static int mod_init(void) }
- bind_auth = (bind_auth_t)find_export("bind_auth", 0, 0); + bind_auth = (bind_auth_s_t)find_export("bind_auth_s", 0, 0); if (!bind_auth) { LOG(L_ERR, "auth_radius: Unable to find bind_auth function\n"); return -1; diff --git a/modules_s/auth_radius/authrad_mod.h b/modules_s/auth_radius/authrad_mod.h index 9467c73..116c7bf 100644 --- a/modules_s/auth_radius/authrad_mod.h +++ b/modules_s/auth_radius/authrad_mod.h @@ -35,7 +35,7 @@ #ifndef AUTHRAD_MOD_H #define AUTHRAD_MOD_H
-#include "../auth/api.h" +#include "../../modules_s/auth/api.h" #include "../../rad_dict.h"
extern struct attr attrs[]; @@ -45,6 +45,6 @@ extern void *rh; extern int use_did; extern int use_ruri_flag;
-extern auth_api_t auth_api; +extern auth_api_s_t auth_api;
#endif /* AUTHRAD_MOD_H */ diff --git a/modules_s/auth_radius/sterman.c b/modules_s/auth_radius/sterman.c index b753f0e..11ba189 100644 --- a/modules_s/auth_radius/sterman.c +++ b/modules_s/auth_radius/sterman.c @@ -34,7 +34,7 @@
#include "../../mem/mem.h" #include "../../dprint.h" -#include "../auth/api.h" +#include "../../modules_s/auth/api.h" #include "../../rad_dict.h" #include "../../usr_avp.h" #include "../../ut.h" diff --git a/modules_s/osp/orig_transaction.c b/modules_s/osp/orig_transaction.c index 905b770..8ab4cd8 100644 --- a/modules_s/osp/orig_transaction.c +++ b/modules_s/osp/orig_transaction.c @@ -38,7 +38,7 @@ #include "../../dset.h" #include "../../usr_avp.h" #include "../../mem/mem.h" -#include "../auth/api.h" +#include "../../modules_s/auth/api.h" #include "orig_transaction.h" #include "destination.h" #include "osptoolkit.h" @@ -49,7 +49,7 @@ extern char* _osp_device_ip; extern char* _osp_device_port; extern int _osp_max_dests; extern OSPTPROVHANDLE _osp_provider; -extern auth_api_t osp_auth; +extern auth_api_s_t osp_auth; extern int _osp_redir_uri;
const int OSP_FIRST_ROUTE = 1;