浏览代码

kcore: print_rr_body: return number of printed Record-Route bodies

Act like the documentation, return the number of printed RR bodies, not the
total number of RR bodies.

(cherry picked from commit aa4fabe05dd3b6dc841325fe279596293d327a92)
Alex Hermann 11 年之前
父节点
当前提交
ae01e2ed5e
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      parser/parse_rr.c

+ 2 - 2
parser/parse_rr.c

@@ -441,9 +441,9 @@ int print_rr_body(struct hdr_field *iroute, str *oroute, int order,
 	oroute->len=cp - start;
 
 	LM_DBG("out rr [%.*s]\n", oroute->len, oroute->s);
-	LM_DBG("we have %i records\n", n);
+	LM_DBG("we have %i records\n", (nb_recs == NULL) ? n : n-*nb_recs);
 	if(nb_recs != NULL)
-		*nb_recs = (unsigned int)n; 
+		*nb_recs = (unsigned int)n-*nb_recs;
 
 	return 0;