Skip to content

Commit

Permalink
Update sipcapture.c
Browse files Browse the repository at this point in the history
optimized table value
  • Loading branch information
adubovikov committed Apr 8, 2015
1 parent ee72109 commit 261a7b8
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions modules/sipcapture/sipcapture.c
Expand Up @@ -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_;

Expand Down Expand Up @@ -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");

Expand Down

0 comments on commit 261a7b8

Please sign in to comment.