rem: if (pchanged)
add: parse_pidf(body, &basic, &location);  LOG(L_INFO, "publish_presentity: -1-\n"); if (basic.len && basic.s) { int origstate = presentity->state; presentity->state = (strcmp(basic.s, "online") == 0) ? PS_ONLINE : PS_OFFLINE; if (presentity->state != origstate) changed = 1; } LOG(L_INFO, "publish_presentity: -2-\n"); if (location.len && location.s) { if (presentity->location.len && strcmp(presentity->location.s, location.s) != 0) changed = 1; presentity->location.len = location.len; presentity->location.s = location.s; }  LOG(L_INFO, "publish_presentity: -3-\n"); if (pchanged && changed) {
context: static int publish_presentity(struct sip_msg* _m, struct pdomain* _d, 			     struct presentity* _p, int *pchanged){	/* for now, assume all publishes cause a change */	if (pchanged)		*pchanged = 1;	return 0;}