rem: if (!m->to && (parse_headers(m, HDR_TO, 0) == -1) )
add: if (!m->to && ((parse_headers(m, HDR_TO, 0) == -1) || (!m->to)))
context: int get_realm(struct sip_msg* m, int hftype, struct sip_uri* u){	str uri;	/* extracting the uri */	if ((REQ_LINE(m).method.len==8)					&& !memcmp(REQ_LINE(m).method.s, "REGISTER", 8) 					&& (hftype == HDR_AUTHORIZATION) ) 	{ 		/* REGISTER */		if (!m->to && (parse_headers(m, HDR_TO, 0) == -1) ) 		{			LOG(L_ERR, M_NAME":get_realm(): Error while parsing TO header\n");			/* signal the errror */			return -1;		}			    /* Body of To header field is parsed automatically */		uri = get_to(m)->uri; 	} 	else 	{		if (parse_from_header(m)<0) 		{			LOG(L_ERR, M_NAME":get_realm(): Error while parsing FROM header\n");			/* signal the error */			return -1;		}		uri = get_from(m)->uri;	}		/* parsing the uri */	if (parse_uri(uri.s, uri.len, u) < 0) 	{		LOG(L_ERR, M_NAME":get_realm(): Error while parsing URI\n");		return -1;	}		/* everything was OK */	return 0;}