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

Function insert_reinvite_ping_timer

modules/dialog/dlg_timer.c:439–465  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

437}
438
439int insert_reinvite_ping_timer(struct dlg_cell* dlg)
440{
441 struct dlg_ping_list *node;
442
443 node = shm_malloc(sizeof(struct dlg_ping_list));
444 if (node == 0) {
445 LM_ERR("no more shm mem\n");
446 return -1;
447 }
448
449 node->dlg = dlg;
450 node->next = 0;
451 node->prev = 0;
452
453 lock_get( reinvite_ping_timer->lock );
454
455 unsafe_insert_reinvite_ping_timer(node,reinvite_ping_interval);
456 dlg->reinvite_pl = node;
457
458 dlg->legs[DLG_CALLER_LEG].reinvite_confirmed = DLG_PING_SUCCESS;
459 dlg->legs[callee_idx(dlg)].reinvite_confirmed = DLG_PING_SUCCESS;
460
461 lock_release( reinvite_ping_timer->lock);
462 LM_DBG("Inserted dlg [%p] in reinvite ping timer list\n",dlg);
463
464 return 0;
465}
466
467static inline void remove_dlg_timer_unsafe(struct dlg_tl *tl)
468{

Callers 4

load_dialog_info_from_dbFunction · 0.85
sync_dlg_db_memFunction · 0.85
dlg_onrouteFunction · 0.85
dlg_replicated_createFunction · 0.85

Calls 4

shm_mallocFunction · 0.85
lock_getFunction · 0.85
lock_releaseFunction · 0.85

Tested by

no test coverage detected