Procházet zdrojové kódy

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).
Andrei Pelinescu-Onciul před 15 roky
rodič
revize
5e4d570b5d

+ 4 - 4
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;

+ 2 - 2
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;

+ 1 - 1
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"

+ 3 - 3
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;

+ 2 - 2
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 */

+ 1 - 1
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"

+ 2 - 2
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;