瀏覽代碼

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

- helps figuring out why it failed
Daniel-Constantin Mierla 10 年之前
父節點
當前提交
692c24ac7d
共有 1 個文件被更改,包括 4 次插入2 次删除
  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) {
 	struct cell     *t;
 	struct sip_msg *orig_msg;
+	int ret;
 
 	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;
 
-	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;
 	}