[sr-dev] git:master:261a7b88: Update sipcapture.c

Alexandr Dubovikov alexandr.dubovikov at gmail.com
Mon Jun 1 11:50:12 CEST 2015


Module: kamailio
Branch: master
Commit: 261a7b88b8c4139e1f6e7252b56f8a783bbacba7
URL: https://github.com/kamailio/kamailio/commit/261a7b88b8c4139e1f6e7252b56f8a783bbacba7

Author: Alexandr Dubovikov <alexandr.dubovikov at gmail.com>
Committer: Alexandr Dubovikov <alexandr.dubovikov at gmail.com>
Date: 2015-04-08T22:41:52+02:00

Update sipcapture.c

optimized table value

---

Modified: modules/sipcapture/sipcapture.c

---

Diff:  https://github.com/kamailio/kamailio/commit/261a7b88b8c4139e1f6e7252b56f8a783bbacba7.diff
Patch: https://github.com/kamailio/kamailio/commit/261a7b88b8c4139e1f6e7252b56f8a783bbacba7.patch

---

diff --git a/modules/sipcapture/sipcapture.c b/modules/sipcapture/sipcapture.c
index 1f475d2..15fd935 100644
--- a/modules/sipcapture/sipcapture.c
+++ b/modules/sipcapture/sipcapture.c
@@ -1096,7 +1096,6 @@ static int sip_capture_store(struct _sipcapture_object *sco, str *dtable, _captu
 
 	str *table = NULL;
 	_capture_mode_data_t *c = NULL;
-	  str newtable;
         char strftime_buf[128];
         time_t tvsec_;
 
@@ -1343,12 +1342,12 @@ static int sip_capture_store(struct _sipcapture_object *sco, str *dtable, _captu
                 return -1;
         }
 
-        newtable.len = strftime(strftime_buf, sizeof(strftime_buf), table->s,  &capt_ts);
-        newtable.s = strftime_buf;
+        table->len = strftime(strftime_buf, sizeof(strftime_buf), table->s,  &capt_ts);
+        table->s = strftime_buf;
 
 	/* check dynamic table */
-	LM_DBG("insert into homer table: [%.*s]\n", newtable->len, newtable->s);
-	c->db_funcs.use_table(c->db_con, newtable);
+	LM_DBG("insert into homer table: [%.*s]\n", table->len, table->s);
+	c->db_funcs.use_table(c->db_con, table);
 
 	LM_DBG("storing info...\n");
 




More information about the sr-dev mailing list