Merge commit 'origin/ser_modules'
[sip-router] / modules_s / rr / loose.c
index d2c73f4..33803fe 100644 (file)
@@ -422,8 +422,8 @@ static int get_direction(struct sip_msg* _m, str* _params) {
                ftag.len = s.s+i - ftag.s;
 
        if (ftag.len) {
-               parse_from_header(_m);          
-               if (get_from(_m)) {             /* compare if from.tag == ftag */
+               if ((parse_from_header(_m)==0) && get_from(_m)) {
+                       /* compare if from.tag == ftag */
                        if (ftag.len!=get_from(_m)->tag_value.len || strncmp(ftag.s, get_from(_m)->tag_value.s, ftag.len)) return 1;
                }
        }