Browse Source

tsilo: print return error code by lookup_to_dset() in ts_append()

- helps figuring out why it failed
Daniel-Constantin Mierla 10 years ago
parent
commit
692c24ac7d
1 changed files with 4 additions and 2 deletions
  1. 4 2
      modules/tsilo/ts_append.c

+ 4 - 2
modules/tsilo/ts_append.c

@@ -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) {
 int ts_append_to(struct sip_msg* msg, int tindex, int tlabel, char *table) {
 	struct cell     *t;
 	struct cell     *t;
 	struct sip_msg *orig_msg;
 	struct sip_msg *orig_msg;
+	int ret;
 
 
 	if(_tmb.t_lookup_ident(&t, tindex, tlabel) < 0)
 	if(_tmb.t_lookup_ident(&t, tindex, tlabel) < 0)
 	{
 	{
@@ -83,8 +84,9 @@ int ts_append_to(struct sip_msg* msg, int tindex, int tlabel, char *table) {
 
 
 	orig_msg = t->uas.request;
 	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;
 		return -1;
 	}
 	}