Skip to content

Commit

Permalink
tsilo: print return error code by lookup_to_dset() in ts_append()
Browse files Browse the repository at this point in the history
- helps figuring out why it failed
  • Loading branch information
miconda committed Sep 21, 2015
1 parent b58a55d commit 692c24a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions modules/tsilo/ts_append.c
Expand Up @@ -73,6 +73,7 @@ int ts_append(struct sip_msg* msg, str *ruri, char *table) {
int ts_append_to(struct sip_msg* msg, int tindex, int tlabel, char *table) {
struct cell *t;
struct sip_msg *orig_msg;
int ret;

if(_tmb.t_lookup_ident(&t, tindex, tlabel) < 0)
{
Expand All @@ -83,8 +84,9 @@ int ts_append_to(struct sip_msg* msg, int tindex, int tlabel, char *table) {

orig_msg = t->uas.request;

if (_regapi.lookup_to_dset(orig_msg, table, NULL) != 1) {
LM_DBG("transaction %u:%u: error updating dset\n", tindex, tlabel);
ret = _regapi.lookup_to_dset(orig_msg, table, NULL);
if(ret != 1) {
LM_DBG("transaction %u:%u: error updating dset (%d)\n", tindex, tlabel, ret);
return -1;
}

Expand Down

0 comments on commit 692c24a

Please sign in to comment.