| 1798 | } |
| 1799 | |
| 1800 | static int t_reply_by_callid(struct sip_msg* msg, unsigned int* code, str* text, str* callid, str* cseq_number) |
| 1801 | { |
| 1802 | struct cell *trans; |
| 1803 | int n; |
| 1804 | |
| 1805 | if (!callid && msg->callid==NULL && ((parse_headers(msg, HDR_CALLID_F, 0) ==-1) || (msg->callid==NULL)) ) { |
| 1806 | /* could not get callid */ |
| 1807 | return -2; |
| 1808 | } |
| 1809 | |
| 1810 | if (!cseq_number && !msg->cseq && ((parse_headers(msg, HDR_CSEQ_F, 0) == -1) || !msg->cseq)) { |
| 1811 | /* could not get cseq */ |
| 1812 | return -3; |
| 1813 | } |
| 1814 | |
| 1815 | if(t_lookup_callid( &trans, callid ? *callid : msg->callid->body, cseq_number ? *cseq_number : get_cseq(msg)->number) < 0) { |
| 1816 | /* transaction not found */ |
| 1817 | return -4; |
| 1818 | } |
| 1819 | |
| 1820 | n = t_reply_with_body( trans, *code, text, 0, 0, 0); |
| 1821 | |
| 1822 | return n; |
| 1823 | } |
| 1824 | |
| 1825 | |
| 1826 | static int t_get_branch_idx_by_attr(struct sip_msg* msg, |
nothing calls this directly
no test coverage detected