Module: sip-router
Branch: janakj/kcore
Commit: f84fdc820e13ad1516969f5cbe6fdf941bfa01cc
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=f84fdc8…
Author: Jan Janak <jan(a)iptel.org>
Committer: Jan Janak <jan(a)iptel.org>
Date: Fri Mar 6 02:21:10 2009 +0100
Replace sibling with header iterator with header type checks
---
lib/kcore/parser_helpers.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/lib/kcore/parser_helpers.c b/lib/kcore/parser_helpers.c
index 5d4ef16..fbfc5a0 100644
--- a/lib/kcore/parser_helpers.c
+++ b/lib/kcore/parser_helpers.c
@@ -111,7 +111,11 @@ int print_rr_body(struct hdr_field *iroute, str *oroute, int order,
}
p = p->next;
}
- iroute = iroute->sibling;
+
+ for(iroute = iroute->next; iroute; iroute = iroute->next) {
+ if (iroute->type == HDR_ROUTE_T) break;
+ }
+/* iroute = iroute->sibling; */
}
for(i=0;i<n;i++){