diff --git a/daemon/call.h b/daemon/call.h index 80fb208..d0bd790 100644 --- a/daemon/call.h +++ b/daemon/call.h @@ -93,6 +93,8 @@ struct peer { unsigned char idx; struct callstream *up; int desired_family; + str ice_ufrag[2]; + str ice_pwd; int kernelized:1; int filled:1; int confirmed:1; @@ -121,9 +123,6 @@ struct call { char redis_uuid[37]; time_t created; time_t lookup_done; - - str ice_ufrag[2]; - str ice_pwd; }; struct callmaster_config { diff --git a/daemon/sdp.c b/daemon/sdp.c index 11eccc5..3273a3c 100644 --- a/daemon/sdp.c +++ b/daemon/sdp.c @@ -857,15 +857,14 @@ int sdp_replace(struct sdp_chopper *chop, GQueue *sessions, struct call *call, goto error; if (flags->ice_force) { - create_random_string(call, &call->ice_ufrag[0], 8); - create_random_string(call, &call->ice_ufrag[1], 8); - create_random_string(call, &call->ice_pwd, 28); + create_random_string(call, &rtp->up->ice_ufrag[0], 8); + create_random_string(call, &rtp->up->ice_pwd, 28); copy_up_to_end_of(chop, &session->s); chopper_append_c(chop, "a=ice-lite\r\na=ice-ufrag:"); - chopper_append_str(chop, &call->ice_ufrag[off]); + chopper_append_str(chop, &rtp->up->ice_ufrag[0]); chopper_append_c(chop, "\r\na=ice-pwd:"); - chopper_append_str(chop, &call->ice_pwd); + chopper_append_str(chop, &rtp->up->ice_pwd); chopper_append_c(chop, "\r\n"); rtp->stun = 1;