Browse code

acc: take SIP method from CSeq header

- safe usage of acc_*_request() for requests & replies

Daniel-Constantin Mierla authored on 29/01/2011 19:47:18
Showing 2 changed files
... ...
@@ -125,8 +125,8 @@ int core2strar(struct sip_msg *req, str *c_vals, int *i_vals, char *t_vals)
125 125
 	struct hdr_field *from;
126 126
 	struct hdr_field *to;
127 127
 
128
-	/* method */
129
-	c_vals[0] = req->first_line.u.request.method;
128
+	/* method : request/reply - cseq parsed in acc_preparse_req() */
129
+	c_vals[0] = get_cseq(req)->method;
130 130
 	t_vals[0] = TYPE_STR;
131 131
 
132 132
 	/* from/to URI and TAG */
... ...
@@ -193,21 +193,21 @@ static int free_acc_fixup(void** param, int param_no);
193 193
 static cmd_export_t cmds[] = {
194 194
 	{"acc_log_request", (cmd_function)w_acc_log_request, 1,
195 195
 		acc_fixup, free_acc_fixup,
196
-		REQUEST_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE|LOCAL_ROUTE},
196
+		ANY_ROUTE},
197 197
 #ifdef SQL_ACC
198 198
 	{"acc_db_request",  (cmd_function)w_acc_db_request,  2,
199 199
 		acc_fixup, free_acc_fixup,
200
-		REQUEST_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE|LOCAL_ROUTE},
200
+		ANY_ROUTE},
201 201
 #endif
202 202
 #ifdef RAD_ACC
203 203
 	{"acc_rad_request", (cmd_function)w_acc_rad_request, 1,
204 204
 		acc_fixup, free_acc_fixup,
205
-		REQUEST_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE|LOCAL_ROUTE},
205
+		ANY_ROUTE},
206 206
 #endif
207 207
 #ifdef DIAM_ACC
208 208
 	{"acc_diam_request",(cmd_function)w_acc_diam_request,1,
209 209
 		acc_fixup, free_acc_fixup,
210
-		REQUEST_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE|LOCAL_ROUTE},
210
+		ANY_ROUTE},
211 211
 #endif
212 212
 	{"bind_acc",    (cmd_function)bind_acc, 0, 0, 0},
213 213
 	{0, 0, 0, 0, 0, 0}