rem: publish_presentity_pidf(_m, _d, presentity, pchanged);
add: if (publish_presentity_pidf(_m, _d, presentity, pchanged, &modified_tuple) == 0) {  if (modified_tuple) { i = modified_tuple->expires - act_time; if (i < 0) i = 0; tmp = (char*)pkg_malloc(64 + modified_tuple->id.len); if (tmp) { sprintf(tmp, "Expires: %d\r\nSIP-ETag: %.*s\r\n", i, modified_tuple->id.len, ZSW(modified_tuple->id.s)); if (!add_lump_rpl(_m, tmp, strlen(tmp), LUMP_RPL_HDR)) { LOG(L_ERR, "publish_presentity(): Can't add headers to the response\n");  } pkg_free(tmp); } } }
context: static int publish_presentity(struct sip_msg* _m, struct pdomain* _d, struct presentity* presentity, int *pchanged){	event_t *parsed_event = NULL;	int event_package = EVENT_OTHER;	if (_m->event) 		parsed_event = (event_t *)_m->event->parsed;	if (parsed_event)		event_package = parsed_event->parsed;	if (event_package == EVENT_PRESENCE) {		publish_presentity_pidf(_m, _d, presentity, pchanged);	} else if (event_package == EVENT_XCAP_CHANGE) {		publish_presentity_xcap_change(_m, _d, presentity, pchanged);	} else {		str callid = { 0, 0 };		if (_m->callid)			callid = _m->callid->body;		LOG(L_WARN, "publish_presentity: no handler for event_package=%d"				" callid=%.*s\n", event_package, callid.len, callid.s);	}	LOG(L_INFO, "publish_presentity: event_package=%d -1-\n", event_package);	return 0;}