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

Function fake_reply

modules/tm/timer.c:249–271  ·  view source on GitHub ↗

used to inject a negative reply in behalf of a certian T branch; as it is * a non-200OK reply, it cannot lead to a cancelling scenario */

Source from the content-addressed store, hash-verified

247/* used to inject a negative reply in behalf of a certian T branch; as it is
248 * a non-200OK reply, it cannot lead to a cancelling scenario */
249static void fake_reply(struct cell *t, int branch, int code )
250{
251 branch_bm_t cancel_bitmap = BRANCH_BM_ZERO;
252 enum rps reply_status;
253
254 _tm_branch_index = branch;
255 if ( is_local(t) ) {
256 reply_status=local_reply( t, FAKED_REPLY, branch,
257 code, cancel_bitmap );
258 if (reply_status==RPS_COMPLETED) {
259 put_on_wait(t);
260 }
261 } else {
262 reply_status=relay_reply( t, FAKED_REPLY, branch, code,
263 cancel_bitmap );
264 }
265 _tm_branch_index = 0;
266 /* again, a final negative reply on a branch will never lead to a
267 * situation to cancel other existing branches, so the
268 * cancel_bitmap should be empty here (we use it as a dummy holder), so
269 * no need trigger an UACs cancelling
270 */
271}
272
273
274

Callers 1

final_response_handlerFunction · 0.85

Calls 3

local_replyFunction · 0.85
put_on_waitFunction · 0.85
relay_replyFunction · 0.85

Tested by

no test coverage detected