* Timer housekeeping, invoked each timer interval to check for proxy re-enablement */
| 1528 | * Timer housekeeping, invoked each timer interval to check for proxy re-enablement |
| 1529 | */ |
| 1530 | void rtpengine_timer(unsigned int ticks, void *param) |
| 1531 | { |
| 1532 | int disabled; |
| 1533 | struct rtpe_set *rtpe_list; |
| 1534 | struct rtpe_node *crt_rtpe; |
| 1535 | |
| 1536 | if (*rtpe_set_list == NULL) |
| 1537 | return; |
| 1538 | |
| 1539 | RTPE_START_READ(); |
| 1540 | if (my_version != *list_version && update_rtpengines(0) < 0) { |
| 1541 | LM_ERR("cannot update rtpengines list\n"); |
| 1542 | RTPE_STOP_READ(); |
| 1543 | return; |
| 1544 | } |
| 1545 | for(rtpe_list = (*rtpe_set_list)->rset_first; rtpe_list != NULL; |
| 1546 | rtpe_list = rtpe_list->rset_next){ |
| 1547 | for(crt_rtpe = rtpe_list->rn_first; crt_rtpe != NULL; |
| 1548 | crt_rtpe = crt_rtpe->rn_next){ |
| 1549 | if ((crt_rtpe->rn_disabled && crt_rtpe->rn_recheck_ticks <= get_ticks()) || |
| 1550 | (rtpengine_ping_enabled && !crt_rtpe->rn_disabled && |
| 1551 | crt_rtpe->rn_last_ticks + rtpengine_timer_interval <= get_ticks())) { |
| 1552 | disabled = crt_rtpe->rn_disabled; |
| 1553 | crt_rtpe->rn_disabled = rtpe_test(crt_rtpe, disabled, 1); |
| 1554 | if (crt_rtpe->rn_disabled != disabled) |
| 1555 | raise_rtpengine_status_event(crt_rtpe); |
| 1556 | } |
| 1557 | } |
| 1558 | } |
| 1559 | RTPE_STOP_READ(); |
| 1560 | } |
| 1561 | |
| 1562 | /* hack to get the rtpengine node used for the offer */ |
| 1563 | static pv_spec_t media_pvar; |
nothing calls this directly
no test coverage detected