rem: LOG(L_ERR, "handle_publish -4- p_uri=%*.s p_uri.len=%d\n", p_uri.len, p_uri.s, p_uri.len);
context: int handle_publish(struct sip_msg* _m, char* _domain, char* _s2){	struct pdomain* d;	struct presentity *p;	str p_uri = { NULL, 0 };	int changed;	get_act_time();	paerrno = PA_OK;	LOG(L_ERR, "handle_publish -1- _m=%p\n", _m);	if (parse_publish_hfs(_m) < 0) {		LOG(L_ERR, "handle_publish(): Error while parsing message header\n");		goto error;	}	LOG(L_ERR, "handle_publish -1b-\n");#if 0	if (check_message(_m) < 0) {		LOG(L_ERR, "handle_publish(): Error while checking message\n");		goto error;	}	LOG(L_ERR, "handle_publish -1c-\n");#endif	d = (struct pdomain*)_domain;	if (get_pres_uri(_m, &p_uri) < 0 || p_uri.s == NULL || p_uri.len == 0) {		LOG(L_ERR, "handle_publish(): Error while extracting presentity URI\n");		goto error;	}	LOG(L_ERR, "handle_publish -2-\n");	lock_pdomain(d);		LOG(L_ERR, "handle_publish -4- p_uri=%*.s p_uri.len=%d\n", p_uri.len, p_uri.s, p_uri.len);	if (find_presentity(d, &p_uri, &p) > 0) {		changed = 1;		if (create_presentity_only(_m, d, &p_uri, &p) < 0) {			goto error2;		}	}	/* update presentity event state */	LOG(L_ERR, "handle_publish -5- presentity=%p\n", p);	if (p)		publish_presentity(_m, d, p, &changed);		unlock_pdomain(d);	if (send_reply(_m) < 0) return -1;	LOG(L_ERR, "handle_publish -8- paerrno=%d\n", paerrno);	return 1;	 error2:	unlock_pdomain(d); error:	send_reply(_m);	return 0;}