[vlma-devel] commit: Don' t update the broadcast state of a whole order when only one media is concerned . (Adrien Grand )

git version control git at videolan.org
Sun Dec 21 23:54:24 CET 2008


vlma | branch: master | Adrien Grand <jpountz at videolan.org> | Sun Dec 21 23:51:04 2008 +0100| [0e4aa95c007519737329c4eaaf85944fba40babc] | committer: Adrien Grand 

Don't update the broadcast state of a whole order when only one media is concerned.

> http://git.videolan.org/gitweb.cgi/vlma.git/?a=commit;h=0e4aa95c007519737329c4eaaf85944fba40babc
---

 .../main/java/org/videolan/vlma/OrderManager.java  |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/vlma-core/src/main/java/org/videolan/vlma/OrderManager.java b/vlma-core/src/main/java/org/videolan/vlma/OrderManager.java
index 5425064..95d7943 100644
--- a/vlma-core/src/main/java/org/videolan/vlma/OrderManager.java
+++ b/vlma-core/src/main/java/org/videolan/vlma/OrderManager.java
@@ -61,7 +61,7 @@ public class OrderManager {
      * @return true upon changes
      */
     public synchronized boolean updateMedias() {
-        boolean result = true;
+        boolean result = false;
         for(Map.Entry<String, Map.Entry<Order, State>> entry : orders.entrySet()) {
             State state = entry.getValue().getValue();
             if(state.equals(State.STOPPED) || state.equals(State.TO_STOP))
@@ -79,7 +79,7 @@ public class OrderManager {
                     } else {
                         program.setBroadcastState(true);
                     }
-                    if(broadcastState != program.getBroadcastState()) {
+                    if (broadcastState != program.getBroadcastState()) {
                         Monitor.dispatch(program.getBroadcastState() ?
                                 Monitor.MediaEvent.BROADCASTED :
                                     Monitor.MediaEvent.NOT_BROADCASTED, media);
@@ -155,7 +155,6 @@ public class OrderManager {
                     Program program = media.getProgram();
                     if(program != null) {
                         program.setAdapterName(order.getAdapter().getName());
-                        program.setBroadcastState(false);
                         program.setPlayer(order.getAdapter().getServer().getIp());
                     }
                 }



More information about the vlma-devel mailing list