| 830 | |
| 831 | |
| 832 | static int do_t_cleanup( struct sip_msg *req, void *bar) |
| 833 | { |
| 834 | struct cell *t; |
| 835 | |
| 836 | empty_tmcb_list(&tmcb_pending_hl); |
| 837 | |
| 838 | t = get_cancelled_t(); |
| 839 | if (t!=NULL && t!=T_UNDEFINED) |
| 840 | t_unref_cell(t); |
| 841 | |
| 842 | t = get_e2eack_t(); |
| 843 | if (t!=NULL && t!=T_UNDEFINED) |
| 844 | t_unref_cell(t); |
| 845 | |
| 846 | reset_e2eack_t(); |
| 847 | |
| 848 | if ( (t=get_t())!=NULL && t!=T_UNDEFINED && /* we have a transaction */ |
| 849 | t->uas.request && req->REQ_METHOD==t->uas.request->REQ_METHOD) { |
| 850 | /* check the UAS request not yet updated from script msg */ |
| 851 | LOCK_REPLIES(t); |
| 852 | if (t->uas.request->msg_flags & FL_SHM_UPDATED) |
| 853 | LM_DBG("transaction %p already updated! Skipping update!\n", t); |
| 854 | else |
| 855 | update_cloned_msg_from_msg( t->uas.request, req); |
| 856 | UNLOCK_REPLIES(t); |
| 857 | } |
| 858 | |
| 859 | return t_unref(req) == 0 ? SCB_DROP_MSG : SCB_RUN_ALL; |
| 860 | } |
| 861 | |
| 862 | |
| 863 | static int script_init( struct sip_msg *msg, void *bar) |
nothing calls this directly
no test coverage detected