Browse Source

TT#81212 mark calls as owned upon activity

Change-Id: I770d759e11e3ca10c6d879b0e8204ee2bc37bf72
pull/1126/head
Richard Fuchs 5 years ago
parent
commit
aa5e024417
2 changed files with 6 additions and 10 deletions
  1. +4
    -10
      daemon/call_interfaces.c
  2. +2
    -0
      daemon/media_socket.c

+ 4
- 10
daemon/call_interfaces.c View File

@ -1214,16 +1214,7 @@ static const char *call_offer_answer_ng(bencode_item_t *input,
* call in memory and recreates an OWN call in redis */
// SDP fragments for trickle ICE must always operate on an existing call
if (opmode == OP_OFFER && !flags.fragment) {
if (call) {
if (IS_FOREIGN_CALL(call)) {
/* destroy call and create new one */
rwlock_unlock_w(&call->master_lock);
call_destroy(call);
obj_put(call);
call = call_get_or_create(&flags.call_id, 0);
}
}
else {
if (!call) {
/* call == NULL, should create call */
call = call_get_or_create(&flags.call_id, 0);
}
@ -1233,6 +1224,9 @@ static const char *call_offer_answer_ng(bencode_item_t *input,
if (!call)
goto out;
if (IS_FOREIGN_CALL(call))
call_make_own_foreign(call, 0);
if (!call->created_from && addr) {
call->created_from = call_strdup(call, addr);
call->created_from_addr = sin->address;


+ 2
- 0
daemon/media_socket.c View File

@ -1876,6 +1876,8 @@ static int stream_packet(struct packet_handler_ctx *phc) {
}
#endif
if (IS_FOREIGN_CALL(phc->mp.call))
call_make_own_foreign(phc->mp.call, 0);
// this sets rtcp, in_srtp, out_srtp, and sink
media_packet_rtcp_demux(phc);


Loading…
Cancel
Save