From 0ed8587e05c05e371c07df1b1e80108fd6b9f08c Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Thu, 28 Feb 2013 13:25:00 -0500 Subject: [PATCH] move ice_ufrag/pwd into peer struct --- daemon/call.h | 5 ++--- daemon/sdp.c | 9 ++++----- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/daemon/call.h b/daemon/call.h index 80fb2087e..d0bd790d6 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 11eccc53c..3273a3c20 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;