[vlma-devel] commit: Make Adapter#isUp default to true. (Adrien Grand )

git version control git at videolan.org
Sun Nov 30 01:48:40 CET 2008


vlma | branch: master | Adrien Grand <jpountz at videolan.org> | Sat Nov 29 22:07:22 2008 +0100| [97c2655f46efff5ae02bab3fccdb6ce185f623e7] | committer: Adrien Grand 

Make Adapter#isUp default to true.

Bug introduced in f7c54b5f36d2a42edb4559b1e2c4229fafe1c1b2.

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

 .../java/org/videolan/vlma/dao/VLMaDaoImpl.java    |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/vlma-core/src/main/java/org/videolan/vlma/dao/VLMaDaoImpl.java b/vlma-core/src/main/java/org/videolan/vlma/dao/VLMaDaoImpl.java
index 718f3f3..206307f 100644
--- a/vlma-core/src/main/java/org/videolan/vlma/dao/VLMaDaoImpl.java
+++ b/vlma-core/src/main/java/org/videolan/vlma/dao/VLMaDaoImpl.java
@@ -87,6 +87,7 @@ public class VLMaDaoImpl implements VLMaDao {
         xstream.alias("announcement", StreamingStrategy.Announcement.class);
         xstream.alias("data", DataContainer.class);
         xstream.omitField(Adapter.class, "isUp");
+        xstream.omitField(Adapter.class, "isBusy");
         xstream.omitField(Program.class, "adapterName");
         xstream.omitField(Program.class, "broadcastState");
         xstream.omitField(Program.class, "player");
@@ -372,6 +373,13 @@ public class VLMaDaoImpl implements VLMaDao {
                 for (Server server : (List<Server>) data.servers) {
                     servers.put(server.getId(), server);
                 }
+                // Default value for boolean is false, but we want isUp
+                // to default to true for adapters
+                for(Server server : servers.values()) {
+                    for(Adapter adapter : server.getAdapters()) {
+                        adapter.setUp(true);
+                    }
+                }
             }
             synchronized (medias) {
                 medias = new HashMap<Integer, Media>();



More information about the vlma-devel mailing list