| 5353 | } |
| 5354 | |
| 5355 | static int rtpproxy_api_delete(struct rtp_relay_session *sess, struct rtp_relay_server *server, |
| 5356 | str *flags, str *extra) |
| 5357 | { |
| 5358 | int ret = -1; |
| 5359 | struct rtpp_set *rset = NULL; |
| 5360 | struct rtpp_args args; |
| 5361 | |
| 5362 | memset(&args, '\0', sizeof(args)); |
| 5363 | if (!rtpproxy_fill_call_args(sess, &args, NULL, NULL, |
| 5364 | NULL, NULL, NULL, flags, extra, 0)) |
| 5365 | return -1; |
| 5366 | |
| 5367 | if (nh_lock) { |
| 5368 | lock_start_read( nh_lock ); |
| 5369 | } |
| 5370 | |
| 5371 | rset = select_rtpp_set(server->set); |
| 5372 | if (!rset) { |
| 5373 | LM_ERR("RTPProxy set %d\n not available!\n", server->set); |
| 5374 | goto exit; |
| 5375 | } |
| 5376 | |
| 5377 | args.set = rset; |
| 5378 | |
| 5379 | args.node = get_rtpp_node(&server->node, rset); |
| 5380 | if (!args.node) { |
| 5381 | LM_ERR("Could not use node %.*s for delete!\n", |
| 5382 | server->node.len, server->node.s); |
| 5383 | goto exit; |
| 5384 | } |
| 5385 | |
| 5386 | ret = unforce_rtpproxy(sess->msg, &args, NULL); |
| 5387 | exit: |
| 5388 | if (nh_lock) { |
| 5389 | lock_stop_read( nh_lock ); |
| 5390 | } |
| 5391 | rtpproxy_free_call_args(&args); |
| 5392 | return ret; |
| 5393 | } |
| 5394 | |
| 5395 | struct rtpproxy_sdp_buf { |
| 5396 | int length; |
nothing calls this directly
no test coverage detected