MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / delete_handler

Function delete_handler

modules/tm/timer.c:490–515  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

488
489
490inline static void delete_handler( struct timer_link *dele_tl )
491{
492 struct cell *p_cell;
493
494 p_cell = get_dele_timer_payload( dele_tl );
495 LM_DBG("removing %p \n", p_cell );
496#ifdef EXTRA_DEBUG
497 if (p_cell->damocles==0) {
498 LM_ERR("transaction %p not scheduled for deletion"
499 " and called from DELETE timer\n",p_cell);
500 abort();
501 }
502#endif
503
504 /* we call delete now without any locking on hash/ref_count;
505 we can do that because delete_handler is only entered after
506 the delete timer was installed from wait_handler, which
507 removed transaction from hash table and did not destroy it
508 because some processes were using it; that means that the
509 processes currently using the transaction can unref and no
510 new processes can ref -- we can wait until ref_count is
511 zero safely without locking
512 */
513 delete_cell( p_cell, 0 /* don't unlock on return */ );
514 LM_DBG("done\n");
515}
516
517
518/***********************************************************/

Callers

nothing calls this directly

Calls 1

delete_cellFunction · 0.85

Tested by

no test coverage detected