[sr-dev] git:master: auth(k): s/auth_api/auth_api_k & s/bind_auth/bind_auth_k
Andrei Pelinescu-Onciul
andrei at iptel.org
Mon Jun 14 18:02:43 CEST 2010
Module: sip-router
Branch: master
Commit: dfe0feb20ba6d33ff3fcef80db0add9f23ffdf2a
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=dfe0feb20ba6d33ff3fcef80db0add9f23ffdf2a
Author: Andrei Pelinescu-Onciul <andrei at iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei at iptel.org>
Date: Mon Jun 14 17:15:50 2010 +0200
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.
---
modules_k/auth/api.c | 2 +-
modules_k/auth/api.h | 8 ++++----
modules_k/auth/auth_mod.c | 2 +-
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/modules_k/auth/api.c b/modules_k/auth/api.c
index 8c43ed2..73ad97e 100644
--- a/modules_k/auth/api.c
+++ b/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");
diff --git a/modules_k/auth/api.h b/modules_k/auth/api.h
index 1140214..87f2839 100644
--- a/modules_k/auth/api.h
+++ b/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
diff --git a/modules_k/auth/auth_mod.c b/modules_k/auth/auth_mod.c
index 638eaf0..fd1e405 100644
--- a/modules_k/auth/auth_mod.c
+++ b/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}
};
More information about the sr-dev
mailing list