| 172 | static void unlink_timers( struct cell *t ); |
| 173 | |
| 174 | static void delete_cell( struct cell *p_cell, int unlock ) |
| 175 | { |
| 176 | #ifdef EXTRA_DEBUG |
| 177 | int i; |
| 178 | #endif |
| 179 | |
| 180 | /* there may still be FR/RETR timers, which have been reset |
| 181 | (i.e., time_out==TIMER_DELETED) but are stilled linked to |
| 182 | timer lists and must be removed from there before the |
| 183 | structures are released |
| 184 | */ |
| 185 | unlink_timers( p_cell ); |
| 186 | |
| 187 | #ifdef EXTRA_DEBUG |
| 188 | if (is_in_timer_list2(& p_cell->wait_tl )) { |
| 189 | LM_ERR("transaction %p scheduled for deletion and still on WAIT," |
| 190 | " timeout=%lld\n",p_cell, p_cell->wait_tl.time_out); |
| 191 | abort(); |
| 192 | } |
| 193 | if (is_in_timer_list2(& p_cell->uas.response.retr_timer )) { |
| 194 | LM_ERR("transaction %p scheduled for deletion and still on RETR (rep)," |
| 195 | "timeout=%lld\n",p_cell, p_cell->uas.response.retr_timer.time_out); |
| 196 | abort(); |
| 197 | } |
| 198 | if (is_in_timer_list2(& p_cell->uas.response.fr_timer )) { |
| 199 | LM_ERR("transaction %p scheduled for deletion and still on FR (rep)," |
| 200 | " timeout=%lld\n", p_cell,p_cell->uas.response.fr_timer.time_out); |
| 201 | abort(); |
| 202 | } |
| 203 | for (i=0; i<p_cell->nr_of_outgoings; i++) { |
| 204 | if (is_in_timer_list2(&TM_BRANCH(p_cell, i).request.retr_timer)) { |
| 205 | LM_ERR("transaction %p scheduled for deletion and still on RETR " |
| 206 | "(req %d), timeout %lld\n", p_cell, i, |
| 207 | TM_BRANCH(p_cell, i).request.retr_timer.time_out); |
| 208 | abort(); |
| 209 | } |
| 210 | if (is_in_timer_list2(&TM_BRANCH(p_cell, i).request.fr_timer)) { |
| 211 | LM_ERR("transaction %p scheduled for deletion and" |
| 212 | " still on FR (req %d), timeout %lld\n", p_cell, i, |
| 213 | TM_BRANCH(p_cell, i).request.fr_timer.time_out); |
| 214 | abort(); |
| 215 | } |
| 216 | if (is_in_timer_list2(&TM_BRANCH(p_cell, i).local_cancel.retr_timer)) { |
| 217 | LM_ERR("transaction %p scheduled for deletion and" |
| 218 | " still on RETR/cancel (req %d), timeout %lld\n", p_cell, i, |
| 219 | TM_BRANCH(p_cell, i).local_cancel.retr_timer.time_out); |
| 220 | abort(); |
| 221 | } |
| 222 | if (is_in_timer_list2(&TM_BRANCH(p_cell, i).local_cancel.fr_timer)) { |
| 223 | LM_ERR("transaction %p scheduled for deletion and" |
| 224 | " still on FR/cancel (req %d), timeout %lld\n", p_cell, i, |
| 225 | TM_BRANCH(p_cell, i).local_cancel.fr_timer.time_out); |
| 226 | abort(); |
| 227 | } |
| 228 | } |
| 229 | /* reset_retr_timers( hash__XX_table, p_cell ); */ |
| 230 | #endif |
| 231 | /* still in use ... don't delete */ |
no test coverage detected