| 1765 | |
| 1766 | |
| 1767 | static int api_t_wait_no_more_branches(void) |
| 1768 | { |
| 1769 | struct cell *t; |
| 1770 | int is_local = 0, rc; |
| 1771 | |
| 1772 | t = get_t(); |
| 1773 | if (t != T_NULL_CELL && t != T_UNDEFINED) { |
| 1774 | is_local = 1; |
| 1775 | } else { |
| 1776 | if (remote_T == NULL) |
| 1777 | return -1; |
| 1778 | |
| 1779 | if (remote_T->hash == 0 && remote_T->label == 0) { |
| 1780 | LM_BUG("invalid T ID (bad hexa %d,%d) found in remote_T\n", |
| 1781 | remote_T->hash, remote_T->label); |
| 1782 | return -1; |
| 1783 | } |
| 1784 | |
| 1785 | if (t_lookup_ident(&t, remote_T->hash, remote_T->label) < 0) { |
| 1786 | LM_DBG("transaction %u:%u not found anymore\n", |
| 1787 | remote_T->hash, remote_T->label); |
| 1788 | return -1; |
| 1789 | } |
| 1790 | } |
| 1791 | |
| 1792 | rc = t_wait_no_more_branches_timeout(t, 408) < 0 ? -1 : 1; |
| 1793 | |
| 1794 | if (!is_local) |
| 1795 | t_unref_cell(t); |
| 1796 | |
| 1797 | return rc; |
| 1798 | } |
| 1799 | |
| 1800 | static int t_reply_by_callid(struct sip_msg* msg, unsigned int* code, str* text, str* callid, str* cseq_number) |
| 1801 | { |
nothing calls this directly
no test coverage detected