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

Function insert_ping_timer

modules/dialog/dlg_timer.c:371–397  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

369}
370
371int insert_ping_timer(struct dlg_cell* dlg)
372{
373 struct dlg_ping_list *node;
374
375 node = shm_malloc(sizeof(struct dlg_ping_list));
376 if (node == 0) {
377 LM_ERR("no more shm mem\n");
378 return -1;
379 }
380
381 node->dlg = dlg;
382 node->next = 0;
383 node->prev = 0;
384
385 lock_get( ping_timer->lock );
386
387 unsafe_insert_ping_timer(node,options_ping_interval);
388 dlg->pl = node;
389
390 dlg->legs[DLG_CALLER_LEG].reply_received = DLG_PING_SUCCESS;
391 dlg->legs[callee_idx(dlg)].reply_received = DLG_PING_SUCCESS;
392
393 lock_release( ping_timer->lock);
394 LM_DBG("Inserted dlg [%p] in ping timer list\n",dlg);
395
396 return 0;
397}
398
399void unsafe_insert_reinvite_ping_timer(struct dlg_ping_list *node,int new_timeout)
400{

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
unsafe_insert_ping_timerFunction · 0.85
lock_releaseFunction · 0.85

Tested by

no test coverage detected