add: } else if (res > 0) { LOG(L_ERR, "ras(): UAC screwed up the route set !\n"); return 0;
context: static inline int route_after_strict(struct sip_msg* _m, struct sip_uri* _ruri){	int res, rem_len;	struct hdr_field* hdr;	struct sip_uri puri;	rr_t* rt, *prev;	char* rem_off;	str* uri;	hdr = _m->route;	rt = (rr_t*)hdr->parsed;	if (enable_double_rr && is_2rr(&_ruri->params)) {		DBG("ras(): Removing 2nd URI of mine: '%.*s'\n", rt->nameaddr.uri.len, rt->nameaddr.uri.s); 		if (!rt->next) {			     /* No next route in the same header, remove the whole header			      * field immediately			      */			if (!del_lump(&_m->add_rm, hdr->name.s - _m->buf, hdr->len, 0)) {				LOG(L_ERR, "ras(): Can't remove Route HF\n");				return -1;			}			res = find_next_route(_m, &hdr);			if (res < 0) {				LOG(L_ERR, "ras(): Error while finding next route\n");				return -2;			}			if (res > 0) { /* No next route found */				DBG("ras(): No next URI found\n");				return 1;			}			rt = (rr_t*)hdr->parsed;		} else rt = rt->next;	}	uri = &rt->nameaddr.uri;	if (parse_uri(uri->s, uri->len, &puri) == -1) {		LOG(L_ERR, "ras(): Error while parsing URI\n");		return -1;	}	if (is_strict(&puri.params)) {		DBG("ras(): Next hop: '%.*s' is strict router\n", uri->len, uri->s);		     /* Previous hop was a strict router and the next hop is strict		      * router too. There is no need to save R-URI again because it		      * is saved already. In fact, in this case we will behave exactly		      * like a strict router.		      */		     /* Note: when there is only one Route URI left (endpoint), it will		      * always be a strict router because endpoints don't use ;lr parameter		      * In this case we will simply put the URI in R-URI and forward it, which		      * will work perfectly		      */		if (rewrite_RURI(_m, uri) < 0) {			LOG(L_ERR, "ras(): Error while rewriting request URI\n");			return -4;		}				if (rt->next) {			rem_off = hdr->body.s;			rem_len = rt->next->nameaddr.name.s - hdr->body.s;		} else {			rem_off = hdr->name.s;			rem_len = hdr->len;		}		if (!del_lump(&_m->add_rm, rem_off - _m->buf, rem_len, 0)) {			LOG(L_ERR, "ras(): Can't remove Route HF\n");			return -5;		}	} else {		DBG("ras(): Next hop: '%.*s' is loose router\n", uri->len, uri->s);		_m->dst_uri = *uri;		     /* Next hop is a loose router - Which means that is is not endpoint yet		      * In This case we have to recover from previous strict routing, that means we have		      * to find the last Route URI and put in in R-URI and remove the last Route URI.		      */		if (rt != hdr->parsed) {			     /* There is a previous route uri which was 2nd uri of mine			      * and must be removed here			      */			rem_off = hdr->body.s;			rem_len = rt->nameaddr.name.s - hdr->body.s;			if (!del_lump(&_m->add_rm, rem_off - _m->buf, rem_len, 0)) {				LOG(L_ERR, "ras(): Can't remove Route HF\n");				return -6;			}					}		if (find_last_route(_m, &hdr, &rt, &prev) < 0) {			LOG(L_ERR, "ras(): Error while looking for last Route URI\n");			return -7;		}		uri = &rt->nameaddr.uri;		if (rewrite_RURI(_m, uri) < 0) {			LOG(L_ERR, "ras(): Can't rewrite R-URI\n");			return -8;		}				     /* The first character if uri will be either '<' when it is the only URI in a		      * Route header field or ',' if there is more than one URI in the header field		      */		DBG("ras(): The last route URI: '%.*s'\n", rt->nameaddr.uri.len, rt->nameaddr.uri.s);		if (prev) {			rem_off = prev->nameaddr.name.s + prev->len;			rem_len = rt->nameaddr.name.s + rt->len - rem_off;		} else {			rem_off = hdr->name.s;			rem_len = hdr->len;		}		if (!del_lump(&_m->add_rm, rem_off - _m->buf, rem_len, 0)) {			LOG(L_ERR, "ras(): Can't remove Route HF\n");			return -9;		}	}		return 0;}