| 283 | } |
| 284 | |
| 285 | int insert_dlg_timer(struct dlg_tl *tl, int interval) |
| 286 | { |
| 287 | lock_get( d_timer->lock); |
| 288 | |
| 289 | if (tl->next!=0 || tl->prev!=0) { |
| 290 | lock_release( d_timer->lock); |
| 291 | LM_CRIT("Trying to insert a bogus dlg tl=%p tl->next=%p tl->prev=%p\n", |
| 292 | tl, tl->next, tl->prev); |
| 293 | return -1; |
| 294 | } |
| 295 | tl->timeout = get_ticks()+interval; |
| 296 | |
| 297 | insert_gen_timer_unsafe( d_timer, tl ); |
| 298 | |
| 299 | lock_release( d_timer->lock); |
| 300 | |
| 301 | return 0; |
| 302 | } |
| 303 | |
| 304 | |
| 305 | int insert_attempt_dlg_del_timer(struct dlg_tl *tl, int interval) |
no test coverage detected