Browse code

core: b/f: session in b relay-stream would never be changed

Raphael Coeffic authored on 15/07/2014 11:29:04 • Stefan Sayer committed on 23/07/2014 09:06:32
Showing 1 changed files
... ...
@@ -585,12 +585,13 @@ void AmB2BMedia::changeSessionUnsafe(bool a_leg, AmB2BSession *new_session)
585 585
 
586 586
   for (RelayStreamIterator j = relay_streams.begin(); j != relay_streams.end(); ++j) {
587 587
     AmRtpStream &a = (*j)->a;
588
-    AmRtpStream &b = (*j)->a;
588
+    AmRtpStream &b = (*j)->b;
589 589
 
590 590
     // FIXME: is stop & resume receiving needed here?
591
-    a.changeSession(new_session);
592
-    b.changeSession(new_session);
593
-
591
+    if (a_leg)
592
+      a.changeSession(new_session);
593
+    else
594
+      b.changeSession(new_session);
594 595
   }
595 596
 
596 597
   if (needs_processing) {