#include "t_funcs.h"
#include "../../dprint.h"
#include "../../ut.h"
#include "t_reply.h"
#include "t_fwd.h"
#include "t_cancel.h"
#include "t_msgbuilder.h"
#include "t_lookup.h"

Go to the source code of this file.
Functions | |
| char * | build_cancel (struct cell *Trans, unsigned int branch, unsigned int *len) |
| void | cancel_branch (struct cell *t, int branch) |
| void | cancel_uacs (struct cell *t, branch_bm_t cancel_bm) |
| cancel branches scheduled for deletion | |
| unsigned int | t_uac_cancel (str *headers, str *body, unsigned int cancelled_hashIdx, unsigned int cancelled_label, transaction_cb cb, void *cbp) |
| This function cancels a previously created local invite transaction. | |
| void | which_cancel (struct cell *t, branch_bm_t *cancel_bm) |
| Determine which branches should be canceled. | |
Definition in file t_cancel.c.
| char* build_cancel | ( | struct cell * | Trans, | |
| unsigned int | branch, | |||
| unsigned int * | len | |||
| ) |
Definition at line 124 of file t_cancel.c.
References build_local(), CANCEL, CANCEL_LEN, and cell::to.
Referenced by cancel_branch().
| void cancel_branch | ( | struct cell * | t, | |
| int | branch | |||
| ) |
Definition at line 80 of file t_cancel.c.
References retr_buf::activ_type, retr_buf::branch, retr_buf::buffer, build_cancel(), BUSY_BUFFER, retr_buf::dst, has_tran_tmcbs, _str::len, len, LM_CRIT, LM_DBG, LM_ERR, ua_client::local_cancel, ua_server::request, ua_client::request, run_trans_callbacks(), _str::s, SEND_BUFFER, set_extra_tmcb_params(), start_retr(), TMCB_REQUEST_BUILT, TYPE_LOCAL_CANCEL, cell::uac, and cell::uas.
Referenced by cancel_uacs(), fake_reply(), and reply_received().
| void cancel_uacs | ( | struct cell * | t, | |
| branch_bm_t | cancel_bm | |||
| ) |
cancel branches scheduled for deletion
Definition at line 69 of file t_cancel.c.
References cancel_branch(), and cell::nr_of_outgoings.
Referenced by _reply_light(), cancel_invite(), local_reply(), mi_tm_cancel(), relay_reply(), reply_received(), and t_cancel_branches().
| unsigned int t_uac_cancel | ( | str * | headers, | |
| str * | body, | |||
| unsigned int | cancelled_hashIdx, | |||
| unsigned int | cancelled_label, | |||
| transaction_cb | cb, | |||
| void * | cbp | |||
| ) |
This function cancels a previously created local invite transaction.
The cancel parameter should NOT have any via (CANCEL is hop-by-hop).
>0 if OK (returns the LABEL of the cancel).
Definition at line 140 of file t_cancel.c.
References buf, retr_buf::buffer, build_cell(), build_uac_cancel(), retr_buf::dst, cell::flags, free_cell(), cell::hash_index, insert_into_hash_table_unsafe(), insert_tmcb(), is_local, cell::label, ua_client::last_received, _str::len, len, LM_ERR, LM_WARN, LOCK_HASH, cell::method, cell::nr_of_outgoings, dest_info::proto, dest_info::proto_reserved1, remove_from_hash_table_unsafe(), ua_client::request, reset_avps(), _str::s, SEND_BUFFER, dest_info::send_sock, start_retr(), T_IS_LOCAL_FLAG, t_lookup_ident(), cell::tmcb_hl, TMCB_LOCAL_COMPLETED, TMCB_RESPONSE_IN, dest_info::to, cell::uac, and UNLOCK_HASH.
Referenced by load_tm().
| void which_cancel | ( | struct cell * | t, | |
| branch_bm_t * | cancel_bm | |||
| ) |
Determine which branches should be canceled.
Do it only from within REPLY_LOCK, otherwise collisions could occur (e.g., two 200 for two branches processed by two processes might concurrently try to generate a CANCEL for the third branch, resulting in race conditions during writing to cancel buffer
Definition at line 56 of file t_cancel.c.
References cell::first_branch, and should_cancel_branch().
Referenced by _reply_light(), cancel_invite(), local_reply(), t_cancel_branches(), and t_should_relay_response().
1.5.6