Browse Source

Added check of already parsed header.

Jan Janak 22 years ago
parent
commit
bc64baabf5
1 changed files with 6 additions and 2 deletions
  1. 6 2
      parser/parse_rr.c

+ 6 - 2
parser/parse_rr.c

@@ -33,7 +33,7 @@
 #include "../mem/mem.h"
 #include "../dprint.h"
 #include "../trim.h"
-
+#include "../ut.h"
 
 /*
  * Parse Route and Record-Route header fields
@@ -49,8 +49,12 @@ int parse_rr(struct hdr_field* _h)
 		return -1;
 	}
 
+	if (_h->parsed) {
+		     /* Already parsed, return */
+		return 0;
+	}
 
-	     /* Make a temporary copy of the string */
+	     /* Make a temporary copy of the string pointer */
 	s.s = _h->body.s;
 	s.len = _h->body.len;
 	trim_leading(&s);