Browse Source

move ice_ufrag/pwd into peer struct

git.mgm/mediaproxy-ng/2.2
Richard Fuchs 13 years ago
parent
commit
0ed8587e05
2 changed files with 6 additions and 8 deletions
  1. +2
    -3
      daemon/call.h
  2. +4
    -5
      daemon/sdp.c

+ 2
- 3
daemon/call.h View File

@ -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 {


+ 4
- 5
daemon/sdp.c View File

@ -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;


Loading…
Cancel
Save