rem: LOG(L_ERR, "timer_presentity: _p=%x %s flags=%x\n", _p, _p->uri.s, _p->flags);
add: LOG(L_ERR, "timer_presentity: _p=%p %s flags=%x watchers=%p\n", _p, _p->uri.s, _p->flags, _p->watchers);
context: int timer_presentity(presentity_t* _p){	watcher_t* ptr, *t;	if (_p && _p->flags)	     LOG(L_ERR, "timer_presentity: _p=%x %s flags=%x\n", _p, _p->uri.s, _p->flags);	if (_p->flags & PFLAG_WATCHERINFO_CHANGED) {		watcher_t *w = _p->watchers;		while (w) {			if (w->flags & WFLAG_SUBSCRIPTION_CHANGED) {				if (send_notify(_p, w) < 0) {					LOG(L_ERR, "handle_subscription(): Error while sending notify\n");					/* FIXME: watcher and presentity should be test for removal here					 * (and possibly in other error cases too					 */				}				w->flags &= ~WFLAG_SUBSCRIPTION_CHANGED;			}			w = w->next;		}		notify_winfo_watchers(_p);		     /* We remove it here because a notify needs to be send first */		// if (w->expires == 0) free_watcher(w);		// if (p->slot == 0) free_presentity(p);	}	if (_p->flags & (PFLAG_PRESENCE_CHANGED			|PFLAG_PRESENCE_LISTS_CHANGED			|PFLAG_XCAP_CHANGED			|PFLAG_LOCATION_CHANGED)) {		notify_watchers(_p);	}	ptr = _p->watchers;	if (0) print_presentity(stdout, _p);	while(ptr) {	        if (ptr->expires <= act_time) {		  LOG(L_ERR, "Removing watcher %.*s\n", ptr->uri.len, ptr->uri.s);			ptr->expires = 0;			send_notify(_p, ptr);			t = ptr;			ptr = ptr->next;			remove_watcher(_p, t);			free_watcher(t);			continue;		}				ptr = ptr->next;	}	ptr = _p->winfo_watchers;	while(ptr) {	        if (ptr->expires <= act_time) {		  LOG(L_ERR, "Removing watcher %.*s\n", ptr->uri.len, ptr->uri.s);			ptr->expires = 0;			send_notify(_p, ptr);			t = ptr;			ptr = ptr->next;			remove_winfo_watcher(_p, t);			free_watcher(t);			continue;		}				ptr = ptr->next;	}	return 0;}