rem: LOG(L_ERR, "pa_handle_registration: from=%.*s p_uri=%.*s\n", from.len, from.s, p_uri.len, p_uri.s);
add: from = get_from(_m)->uri; if (pa_extract_aor(&from, &p_uri) < 0) { LOG(L_ERR, "pa_handle_registration(): Error while extracting Address Of Record\n"); goto error; }
context: int pa_handle_registration(struct sip_msg* _m, char* _domain, char* _s2){	struct pdomain* d = (struct pdomain*)_domain;	struct presentity *p;	str p_uri;	str from;	LOG(L_ERR, "handle_registration() entered\n");	paerrno = PA_OK;	d = (struct pdomain*)_domain;	if (parse_hfs(_m, 0) < 0) {		paerrno = PA_PARSE_ERR;		LOG(L_ERR, "pa_handle_registration(): Error while parsing headers\n");		return -1;	}	from = get_from(_m)->uri;	if (pa_extract_aor(&from, &p_uri) < 0) {		LOG(L_ERR, "pa_handle_registration(): Error while extracting Address Of Record\n");		goto error;	}	LOG(L_ERR, "pa_handle_registration: from=%.*s p_uri=%.*s\n", 	    from.len, from.s, p_uri.len, p_uri.s);	lock_pdomain(d);		if (find_presentity(d, &p_uri, &p) > 0) {	     LOG(L_ERR, "pa_handle_registration: find_presentity did not find presentity\n");		if (create_presentity_only(_m, d, &p_uri, &p) < 0) {			LOG(L_ERR, "pa_handle_registration(): Error while creating new presentity\n");			goto error2;		}	}	LOG(L_ERR, "pa_handle_registration about to call d->reg p=%p", p);	if (p)	     d->reg(&p->uri, &p->uri, (void*)callback, p);	LOG(L_ERR, "pa_handle_registration about to return 1");	unlock_pdomain(d);	return 1;	 error2:	LOG(L_ERR, "pa_handle_registration about to return -1\n");	unlock_pdomain(d);	return -1; error:	LOG(L_ERR, "pa_handle_registration about to return -2\n");	return -1;}