rem: presence_tuple_t *tuples = _p->tuples; _p->tuples = _t; _t->next = tuples; if (tuples) { tuples->prev = _t; }
add: add_presence_tuple_no_wb(_p, _t); if (use_db) db_add_presence_tuple(_p, _t);
context: void add_presence_tuple(presentity_t *_p, presence_tuple_t *_t){	presence_tuple_t *tuples = _p->tuples;	_p->tuples = _t;	_t->next = tuples;	if (tuples) {		tuples->prev = _t;	}}