int timer_udomain(udomain_t* _d) { struct urecord* ptr, *t; lock_udomain(_d); ptr = _d->d_ll.first; while(ptr) { if (timer_urecord(ptr) < 0) { LOG(L_ERR, "timer_udomain(): Error in timer_urecord\n"); unlock_udomain(_d); return -1; } /* Remove the entire record * if it is empty */ if (ptr->contacts == 0) { t = ptr; ptr = ptr->d_ll.next; mem_delete_urecord(_d, t); } else { ptr = ptr->d_ll.next; } } unlock_udomain(_d); /* process_del_list(_d->name); */ /* process_ins_list(_d->name); */ return 0; }
/*! * \brief Run timer handler for given domain * \param _d domain */ void mem_timer_udomain(udomain_t* _d) { struct urecord* ptr, *t; int i; for(i=0; i<_d->size; i++) { lock_ulslot(_d, i); ptr = _d->table[i].first; while(ptr) { timer_urecord(ptr); /* Remove the entire record if it is empty */ if (ptr->contacts == 0) { t = ptr; ptr = ptr->next; mem_delete_urecord(_d, t); } else { ptr = ptr->next; } } unlock_ulslot(_d, i); } }