rem: pdomain_t *pdomain = NULL; presentity_t *presentity = NULL; str domain, uri, location; int changed = 0;
add: str domain, uri, location;
context: static int pa_location(str* msg){	pdomain_t *pdomain = NULL;	presentity_t *presentity = NULL;	str domain, uri, location;	int changed = 0;	if (unixsock_read_line(&domain, msg) != 0) {		unixsock_reply_asciiz("400 Domain expected\n");		goto err;	}	if (unixsock_read_line(&uri, msg) != 0) {		unixsock_reply_asciiz("400 URI Expected\n");		goto err;	}	if (unixsock_read_line(&location, msg) != 0) {		unixsock_reply_asciiz("400 Location expected\n");		goto err;	}#if 0	domain.s[domain.len] = '\0';	register_pdomain(domain.s, &pdomain);	if (!pdomain) {		unixsock_reply_asciiz("500 Could not register domain\n");		goto err;	}	find_presentity(pdomain, &uri, &presentity);	if (!presentity) {		new_presentity(pdomain, &uri, &presentity);		add_presentity(pdomain, presentity);		changed = 1;	}	if (!presentity) {		unixsock_reply_asciiz("400 Could not find presentity\n");		goto err;	}	if ((presentity->location.loc.len == location.len) &&	    memcmp(presentity->location.loc.s, location.s, location.len)) {		changed = 1;	}	memcpy(presentity->location.loc.s, location.s, location.len);	presentity->location.loc.len = location.len;	if (changed) {		presentity->flags |= PFLAG_PRESENCE_CHANGED;	}	db_update_presentity(presentity);#endif	unixsock_reply_printf("200 published\n",			      "(%.*s %.*s)\n",			      uri.len, ZSW(uri.s),			      location.len, ZSW(location.s));	unixsock_reply_send();	return 1; err:	unixsock_reply_send();	return -1;}