| 305 | |
| 306 | |
| 307 | static int do_for_all_streams(struct sip_msg* msg, str* str1,str * str2, |
| 308 | regex_t* re, int op,int desc) |
| 309 | { |
| 310 | struct sdp_session_cell * cur_session; |
| 311 | sdp_info_t *sdp; |
| 312 | int rez; |
| 313 | |
| 314 | if (msg==NULL || msg==FAKED_REPLY) |
| 315 | return -1; |
| 316 | |
| 317 | sdp = parse_sdp(msg); |
| 318 | if (!sdp) { |
| 319 | LM_DBG("Message has no SDP\n"); |
| 320 | return -1; |
| 321 | } |
| 322 | |
| 323 | if (get_codec_lumps(msg)<0) { |
| 324 | LM_ERR("failed to prepare changes for codecs\n"); |
| 325 | return -1; |
| 326 | } |
| 327 | |
| 328 | cur_session = sdp->sessions; |
| 329 | rez = -1; |
| 330 | |
| 331 | while(cur_session) |
| 332 | { |
| 333 | struct sdp_stream_cell * cur_cell = cur_session->streams; |
| 334 | |
| 335 | while(cur_cell) |
| 336 | { |
| 337 | if(stream_process(msg,cur_cell,str1,str2,re,op,desc)==1) |
| 338 | rez = 1; |
| 339 | cur_cell = cur_cell->next; |
| 340 | } |
| 341 | |
| 342 | cur_session = cur_session->next; |
| 343 | |
| 344 | } |
| 345 | |
| 346 | return rez; |
| 347 | } |
| 348 | |
| 349 | |
| 350 | /* deletes a SDP line (from a stream) by giving a pointer within the line. |
no test coverage detected