Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Diff of /branches/1.9/modules/acc/acc_logic.c [r10394] .. [r10395] Maximize Restore

  Switch to side-by-side view

--- a/branches/1.9/modules/acc/acc_logic.c
+++ b/branches/1.9/modules/acc/acc_logic.c
@@ -1,5 +1,5 @@
 /*
- * $Id: acc_logic.c 10360 2013-11-22 15:40:28Z opensipsrelease $
+ * $Id: acc_logic.c 10395 2014-03-12 17:07:47Z opensipsrelease $
  * 
  * Accounting module logic
  *
@@ -210,7 +210,7 @@
 int w_acc_db_request(struct sip_msg *rq, pv_elem_t* comment, char *table)
 {
 	struct acc_param accp;
-	int table_len = strlen(table);
+	int table_len;
 
 	if (!table) {
 		LM_ERR("db support not configured\n");
@@ -220,11 +220,13 @@
 	if (acc_preparse_req(rq)<0)
 		return -1;
 
+	table_len = strlen(table);
+
 	acc_pvel_to_acc_param(rq, comment, &accp);
 
 	env_set_to( rq->to );
 	env_set_comment( &accp );
-	env_set_text(table, strlen(table));
+	env_set_text(table, table_len);
 
 	if (table_len == db_table_mc.len && (strncmp(table, db_table_mc.s, table_len) == 0)) {
 		return acc_db_request(rq, NULL, &mc_ins_list);