MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / script_init

Function script_init

modules/tm/tm.c:863–887  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

861
862
863static int script_init( struct sip_msg *msg, void *bar)
864{
865 /* we primarily reset all private memory here to make sure
866 * private values left over from previous message will
867 * not be used again */
868 set_t(T_UNDEFINED);
869 reset_cancelled_t();
870 reset_e2eack_t();
871 fr_timeout = timer_id2timeout[FR_TIMER_LIST];
872 fr_inv_timeout = timer_id2timeout[FR_INV_TIMER_LIST];
873
874 /* reset the kill reason status */
875 reset_kr();
876
877 /* reset the static holders for T routes */
878 t_on_negative( 0 );
879 t_on_reply(0);
880 t_on_branch(0);
881
882 if (msg->REQ_METHOD == METHOD_CANCEL && is_anycast(msg->rcv.bind_address) &&
883 tm_anycast_cancel(msg) == 0)
884 return SCB_DROP_MSG;
885
886 return SCB_RUN_ALL;
887}
888
889static int mod_load(void)
890{

Callers

nothing calls this directly

Calls 8

set_tFunction · 0.85
reset_cancelled_tFunction · 0.85
reset_e2eack_tFunction · 0.85
reset_krFunction · 0.85
t_on_negativeFunction · 0.85
t_on_replyFunction · 0.85
t_on_branchFunction · 0.85
tm_anycast_cancelFunction · 0.85

Tested by

no test coverage detected