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

Function get_codec_lumps

modules/sipmsgops/codecs.c:233–272  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

231
232
233static int get_codec_lumps( struct sip_msg *msg )
234{
235 int rc;
236
237 rc = find_codec_lumps(msg);
238 if (rc<0) {
239 LM_ERR("error while searching for codec flags\n");
240 return -1;
241 }
242
243 /* codec lumps not yet created -> create them now */
244 if (rc==1) {
245 if( create_codec_lumps(msg)<0 ) {
246 LM_ERR("failed to create codec lumps\n");
247 return -1;
248 }
249 /* success - we gave the lumps */
250 return 0;
251 }
252
253 /* seams the lumps are already created */
254 if( route_type & (REQUEST_ROUTE | ONREPLY_ROUTE | LOCAL_ROUTE) )
255 {
256 /* save to use them directly */
257 return 0;
258 }
259
260 if( route_type & (FAILURE_ROUTE | BRANCH_ROUTE) )
261 {
262 /* clone the inserted lumps */
263 if ( clone_codec_lumps()<0 ) {
264 LM_ERR("failed to clone codec lumps\n");
265 return -1;
266 }
267 return 0;
268 }
269
270 /* shoudn't get here */
271 return -1;
272};
273
274
275/*

Callers 2

do_for_all_streamsFunction · 0.85
handle_streamsFunction · 0.85

Calls 3

find_codec_lumpsFunction · 0.85
create_codec_lumpsFunction · 0.85
clone_codec_lumpsFunction · 0.85

Tested by

no test coverage detected