rem: if (put_on_del_list(ptr) < 0) { LOG(L_ERR, "wb_timer(): Can't put on delete list\n");
add: if (db_delete_ucontact(ptr) < 0) { LOG(L_ERR, "wb_timer(): Can't delete contact from database\n");
context: static inline int wb_timer(urecord_t* _r){	ucontact_t* ptr, *t;	int op;	int not = 0;	ptr = _r->contacts;	while(ptr) {		if (ptr->expires < act_time) {			if (ptr->replicate != 0) {				LOG(L_NOTICE, "Keeping binding '%.*s','%.*s' for "					"replication\n", ptr->aor->len, ZSW(ptr->aor->s),				    ptr->c.len, ZSW(ptr->c.s));					/* keep it for replication, but it expired normaly					 * and was the last contact, so notify */				if (!ptr->next && ptr->state < CS_ZOMBIE_N) not=1;				ptr = ptr->next;			}			else {					/* state == ZOMBIE the contact was remove by user */				if (ptr->state < CS_ZOMBIE_N) { 					LOG(L_NOTICE, "Binding '%.*s','%.*s' has expired\n",					    ptr->aor->len, ZSW(ptr->aor->s),					    ptr->c.len, ZSW(ptr->c.s));					if (ptr->next == 0) not=1;					_r->slot->d->expired++;				}				t = ptr;				ptr = ptr->next;				     /* Should we remove the contact from the database ? */				if (st_expired_ucontact(t) == 1) {					if (put_on_del_list(t) < 0) {						LOG(L_ERR, "wb_timer(): Can't put on delete list\n");					}				}				mem_delete_ucontact(_r, t);			}			if (not) notify_watchers(_r, PRES_OFFLINE);		} else {			     /* Determine the operation we have to do */			op = st_flush_ucontact(ptr);						switch(op) {			case 0: /* do nothing, contact is synchronized */				break;			case 1: /* insert */				if (put_on_ins_list(ptr) < 0) {					LOG(L_ERR, "wb_timer(): Error while putting on ins_list\n");				}				break;			case 2: /* update */				if (db_update_ucontact(ptr) < 0) {					LOG(L_ERR, "wb_timer(): Error while updating contact in db\n");				}				break;			case 3: /* delete from memory */				mem_delete_ucontact(_r, ptr);				break;			case 4: /* delete */				if (put_on_del_list(ptr) < 0) {					LOG(L_ERR, "wb_timer(): Can't put on delete list\n");				}				mem_delete_ucontact(_r, ptr);				break;			}			ptr = ptr->next;		}	}	return 0;}