add: db_update_presentity(presentity);
context: int fifo_pa_location(FILE *fifo, char *response_file){	char pdomain_s[MAX_P_URI];	char p_uri_s[MAX_P_URI];	char location_s[MAX_LOCATION];	pdomain_t *pdomain = NULL;	presentity_t *presentity = NULL;	str pdomain_name, p_uri, location;	int changed = 0;	if (!read_line(pdomain_s, MAX_PDOMAIN, fifo, &pdomain_name.len) || pdomain_name.len == 0) {		fifo_reply(response_file,			   "400 pa_location: pdomain expected\n");		LOG(L_ERR, "ERROR: pa_location: pdomain expected\n");		return 1;	}	pdomain_name.s = pdomain_s;	if (!read_line(p_uri_s, MAX_P_URI, fifo, &p_uri.len) || p_uri.len == 0) {		fifo_reply(response_file,			   "400 pa_location: p_uri expected\n");		LOG(L_ERR, "ERROR: pa_location: p_uri expected\n");		return 1;	}	p_uri.s = p_uri_s;	if (!read_line(location_s, MAX_LOCATION, fifo, &location.len) || location.len == 0) {		fifo_reply(response_file,			   "400 pa_location: location expected\n");		LOG(L_ERR, "ERROR: pa_location: location expected\n");		return 1;	}	location.s = location_s;	register_pdomain(pdomain_s, &pdomain);	if (!pdomain) {		fifo_reply(response_file, "400 could not register pdomain\n");		LOG(L_ERR, "ERROR: pa_location: could not register pdomain %.*s\n",		    pdomain_name.len, pdomain_name.s);		return 1;	}	find_presentity(pdomain, &p_uri, &presentity);	if (!presentity) {		new_presentity(&p_uri, &presentity);		changed = 1;	}	if (!presentity) {		fifo_reply(response_file, "400 could not find presentity\n");		LOG(L_ERR, "ERROR: pa_location: could not find presentity %.*s\n",		    p_uri.len, p_uri.s);		return 1;	}	if (presentity->location.len && strcmp(presentity->location.s, location.s) != 0)		changed = 1;	if (presentity->location.s)		free(presentity->location.s);	presentity->location.len = location.len;	presentity->location.s = shm_malloc(location.len);	strcpy(presentity->location.s, location_s);	if (changed) {		notify_watchers(presentity);	}	fifo_reply(response_file, "200 published\n",		   "(%.*s %.*s)\n",		   p_uri.len, ZSW(p_uri.s),		   location.len, ZSW(location.s));	return 1;}