ソースを参照

auth(k): s/auth_api/auth_api_k & s/bind_auth/bind_auth_k

Rename auth_api_t and bind_auth (add _k), to avoid possible
runtime problems when mixing ser and kamailio auth_api using
modules.
Andrei Pelinescu-Onciul 15 年 前
コミット
dfe0feb20b
3 ファイル変更6 行追加6 行削除
  1. 1 1
      modules_k/auth/api.c
  2. 4 4
      modules_k/auth/api.h
  3. 1 1
      modules_k/auth/auth_mod.c

+ 1 - 1
modules_k/auth/api.c

@@ -257,7 +257,7 @@ int check_response(dig_cred_t* _cred, str* _method, char* _ha1)
  * \param api binded API
  * \return 0 on success, -1 on failure
  */
-int bind_auth(auth_api_t* api)
+int bind_auth_k(auth_api_k_t* api)
 {
 	if (!api) {
 		LM_ERR("invalid parameter value\n");

+ 4 - 4
modules_k/auth/api.h

@@ -164,17 +164,17 @@ void strip_realm(str *_realm);
 
 
 /*! Auth module API */
-typedef struct auth_api {
+typedef struct auth_api_k {
 	int_str rpid_avp;      /*!< Name of AVP containing Remote-Party-ID */
 	int     rpid_avp_type; /*!< type of the RPID AVP */
 	pre_auth_t  pre_auth;  /*!< The function to be called before auth */
 	post_auth_t post_auth; /*!< The function to be called after auth */
 	calc_HA1_t  calc_HA1;  /*!< calculate H(A1) as per spec */
 	check_response_t check_response; /*!< check auth response */
-} auth_api_t;
+} auth_api_k_t;
 
 
-typedef int (*bind_auth_t)(auth_api_t* api);
+typedef int (*bind_auth_k_t)(auth_api_k_t* api);
 
 
 /*!
@@ -182,7 +182,7 @@ typedef int (*bind_auth_t)(auth_api_t* api);
  * \param api binded API
  * \return 0 on success, -1 on failure
  */
-int bind_auth(auth_api_t* api);
+int bind_auth_k(auth_api_k_t* api);
 
 
 #endif

+ 1 - 1
modules_k/auth/auth_mod.c

@@ -149,7 +149,7 @@ static cmd_export_t cmds[] = {
 	{"append_rpid_hf",      (cmd_function)append_rpid_hf_p,        2,
 			fixup_str_str,
 			0, REQUEST_ROUTE|BRANCH_ROUTE|FAILURE_ROUTE},
-	{"bind_auth",           (cmd_function)bind_auth, 0, 0,
+	{"bind_auth_k",           (cmd_function)bind_auth_k, 0, 0,
 			0, 0},
 	{0, 0, 0, 0, 0, 0}
 };