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

Function kill_transaction

modules/tm/t_funcs.c:154–179  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

152
153
154static int kill_transaction( struct cell *trans )
155{
156 char err_buffer[128];
157 int sip_err;
158 int reply_ret;
159 int ret;
160 str reason;
161
162 /* we reply statefully and enter WAIT state since error might
163 have occurred in middle of forking and we do not
164 want to put the forking burden on upstream client;
165 however, it may fail too due to lack of memory */
166
167 ret=err2reason_phrase( ser_error, &sip_err,
168 err_buffer, sizeof(err_buffer), "TM" );
169 if (ret>0) {
170 reason.s = err_buffer;
171 reason.len = ret;
172 reply_ret=t_reply( trans, trans->uas.request, sip_err, &reason);
173 /* t_release_transaction( T ); */
174 return reply_ret;
175 } else {
176 LM_ERR("err2reason failed\n");
177 return -1;
178 }
179}
180
181
182int tm_has_request_disponsition_no_cancel(struct sip_msg *msg)

Callers 1

t_relay_toFunction · 0.85

Calls 2

err2reason_phraseFunction · 0.85
t_replyFunction · 0.85

Tested by

no test coverage detected