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

Function store_reply

modules/tm/t_reply.c:1215–1239  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1213}
1214
1215static int store_reply( struct cell *trans, int branch, struct sip_msg *rpl)
1216{
1217# ifdef EXTRA_DEBUG
1218 if (TM_BRANCH(trans, branch).reply) {
1219 LM_ERR("replacing stored reply; aborting\n");
1220 abort();
1221 }
1222# endif
1223
1224 /* when we later do things such as challenge aggregation,
1225 we should parse the message here before we conserve
1226 it in shared memory; -jiri
1227 */
1228 if (rpl==FAKED_REPLY)
1229 TM_BRANCH(trans,branch).reply=FAKED_REPLY;
1230 else
1231 TM_BRANCH(trans,branch).reply = sip_msg_cloner( rpl, 0, 0 );
1232
1233 if (! TM_BRANCH(trans,branch).reply ) {
1234 LM_ERR("failed to alloc' clone memory\n");
1235 return 0;
1236 }
1237
1238 return 1;
1239}
1240
1241/* this is the code which decides what and when shall be relayed
1242 upstream; note well -- it assumes it is entered locked with

Callers 2

relay_replyFunction · 0.85
local_replyFunction · 0.85

Calls 1

sip_msg_clonerFunction · 0.85

Tested by

no test coverage detected