Module: sip-router
Branch: master
Commit: 7866c516bd3bf5c6befc8d978d02bf34ab338e3a
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=7866c51…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Sat Jan 29 20:47:18 2011 +0100
acc: take SIP method from CSeq header
- safe usage of acc_*_request() for requests & replies
---
modules_k/acc/acc.c | 4 ++--
modules_k/acc/acc_mod.c | 8 ++++----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/modules_k/acc/acc.c b/modules_k/acc/acc.c
index 271bdb3..189152b 100644
--- a/modules_k/acc/acc.c
+++ b/modules_k/acc/acc.c
@@ -125,8 +125,8 @@ int core2strar(struct sip_msg *req, str *c_vals, int *i_vals, char
*t_vals)
struct hdr_field *from;
struct hdr_field *to;
- /* method */
- c_vals[0] = req->first_line.u.request.method;
+ /* method : request/reply - cseq parsed in acc_preparse_req() */
+ c_vals[0] = get_cseq(req)->method;
t_vals[0] = TYPE_STR;
/* from/to URI and TAG */
diff --git a/modules_k/acc/acc_mod.c b/modules_k/acc/acc_mod.c
index 6cfef81..ab5ab5b 100644
--- a/modules_k/acc/acc_mod.c
+++ b/modules_k/acc/acc_mod.c
@@ -193,21 +193,21 @@ static int free_acc_fixup(void** param, int param_no);
static cmd_export_t cmds[] = {
{"acc_log_request", (cmd_function)w_acc_log_request, 1,
acc_fixup, free_acc_fixup,
- REQUEST_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE|LOCAL_ROUTE},
+ ANY_ROUTE},
#ifdef SQL_ACC
{"acc_db_request", (cmd_function)w_acc_db_request, 2,
acc_fixup, free_acc_fixup,
- REQUEST_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE|LOCAL_ROUTE},
+ ANY_ROUTE},
#endif
#ifdef RAD_ACC
{"acc_rad_request", (cmd_function)w_acc_rad_request, 1,
acc_fixup, free_acc_fixup,
- REQUEST_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE|LOCAL_ROUTE},
+ ANY_ROUTE},
#endif
#ifdef DIAM_ACC
{"acc_diam_request",(cmd_function)w_acc_diam_request,1,
acc_fixup, free_acc_fixup,
- REQUEST_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE|LOCAL_ROUTE},
+ ANY_ROUTE},
#endif
{"bind_acc", (cmd_function)bind_acc, 0, 0, 0},
{0, 0, 0, 0, 0, 0}