Module: sip-router
Branch: master
Commit: f93a3d56abd81d81d19a24ed0d1da7e1fe30fde1
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=f93a3d5…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Date: Mon Jun 14 17:13:19 2010 +0200
auth(s): s/auth_api/auth_api_s & s/bind_auth/bind_auth_s
Rename auth_api_t and bind_auth (add _s), to avoid possible runtime
problems when mixing ser and kamailio auth_api using modules.
---
modules_s/auth/api.c | 2 +-
modules_s/auth/api.h | 8 ++++----
modules_s/auth/auth_mod.c | 2 +-
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/modules_s/auth/api.c b/modules_s/auth/api.c
index f867ab0..084a96a 100644
--- a/modules_s/auth/api.c
+++ b/modules_s/auth/api.c
@@ -178,7 +178,7 @@ auth_result_t post_auth(struct sip_msg* msg, struct hdr_field* hdr)
}
-int bind_auth(auth_api_t* api)
+int bind_auth_s(auth_api_s_t* api)
{
if (!api) {
LOG(L_ERR, "bind_auth: Invalid parameter value\n");
diff --git a/modules_s/auth/api.h b/modules_s/auth/api.h
index 7228ef7..31ee368 100644
--- a/modules_s/auth/api.h
+++ b/modules_s/auth/api.h
@@ -79,17 +79,17 @@ auth_result_t post_auth(struct sip_msg* msg, struct hdr_field* hdr);
/*
* Auth module API
*/
-typedef struct auth_api {
+typedef struct auth_api_s {
pre_auth_t pre_auth; /* The function to be called before
authentication */
post_auth_t post_auth; /* The function to be called after
authentication */
build_challenge_hf_t build_challenge; /* Function to build digest challenge header
*/
struct qp* qop; /* qop module parameter */
calc_HA1_t calc_HA1;
calc_response_t calc_response;
-} auth_api_t;
+} auth_api_s_t;
-typedef int (*bind_auth_t)(auth_api_t* api);
-int bind_auth(auth_api_t* api);
+typedef int (*bind_auth_s_t)(auth_api_s_t* api);
+int bind_auth_s(auth_api_s_t* api);
#endif /* API_H */
diff --git a/modules_s/auth/auth_mod.c b/modules_s/auth/auth_mod.c
index d33cba7..7a3d40a 100644
--- a/modules_s/auth/auth_mod.c
+++ b/modules_s/auth/auth_mod.c
@@ -108,7 +108,7 @@ struct qp qop = {
*/
static cmd_export_t cmds[] = {
{"consume_credentials", consume_credentials, 0, 0, REQUEST_ROUTE},
- {"bind_auth", (cmd_function)bind_auth, 0, 0, 0 },
+ {"bind_auth_s", (cmd_function)bind_auth_s, 0, 0, 0 },
{0, 0, 0, 0, 0}
};