[vlma-devel] commit: Typo: lenght -> length. (Adrien Grand )

git version control git at videolan.org
Tue Mar 3 04:45:27 CET 2009


vlma | branch: master | Adrien Grand <jpountz at videolan.org> | Sat Feb 28 22:28:28 2009 +0100| [cc2b13252b938f02048c68561ed22f945d9848bf] | committer: Adrien Grand 

Typo: lenght -> length.

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

 .../org/videolan/vlma/monitor/OrderMonitor.java    |    4 ++--
 .../vlma/order/management/OrderManager.java        |   12 +++++++-----
 .../watcher/DirectMulticastStreamWatcher.java      |   14 +++++++-------
 3 files changed, 16 insertions(+), 14 deletions(-)

diff --git a/vlma-core/src/main/java/org/videolan/vlma/monitor/OrderMonitor.java b/vlma-core/src/main/java/org/videolan/vlma/monitor/OrderMonitor.java
index e7621d2..a7be5aa 100644
--- a/vlma-core/src/main/java/org/videolan/vlma/monitor/OrderMonitor.java
+++ b/vlma-core/src/main/java/org/videolan/vlma/monitor/OrderMonitor.java
@@ -59,9 +59,9 @@ public class OrderMonitor extends Monitor {
                         continue;
                     }
                     long currentTime = System.currentTimeMillis();
-                    if(currentTime - lastOrderGiving > configuration.getLong("vlma.monitor.order.give.interval") * 1000L) {
+                    if (currentTime - lastOrderGiving > configuration.getLong("vlma.monitor.order.give.interval") * 1000L) {
                         lastOrderGiving = currentTime;
-                        if(orderManager.updateOrders())
+                        if (orderManager.updateOrders())
                             orderManager.giveOrders();
                         lastOrderGiving = currentTime;
                     } else {
diff --git a/vlma-core/src/main/java/org/videolan/vlma/order/management/OrderManager.java b/vlma-core/src/main/java/org/videolan/vlma/order/management/OrderManager.java
index 1d8837c..42e9b1b 100644
--- a/vlma-core/src/main/java/org/videolan/vlma/order/management/OrderManager.java
+++ b/vlma-core/src/main/java/org/videolan/vlma/order/management/OrderManager.java
@@ -151,16 +151,18 @@ public class OrderManager {
         }
         // 2. Add missing orders
         for (Order order : newOrders.values()) {
-            if(!orders.contains(order.getId())) {
+            if (!orders.contains(order.getId())) {
                 orders.add(order);
                 result = true;
             }
         }
-        // 3. Update medias
+        // 3. Update programs
         for (OrderState entry : orders.entries()) {
             Order order = entry.getOrder();
             switch (entry.getState()) {
             case TO_STOP:
+                // Nothing to do
+                break;
             case STOPPED:
                 order.getAdapter().setBusy(false);
                 for (Program program : order.getPrograms()) {
@@ -191,7 +193,7 @@ public class OrderManager {
             for (OrderState entry : orders.entries()) {
                 Order order = entry.getOrder();
                 SendOrder sendThread = sendThreads.get(order.getAdapter().getServer());
-                if(sendThread == null) {
+                if (sendThread == null) {
                     sendThread = new SendOrder();
                     sendThreads.put(order.getAdapter().getServer(), sendThread);
                 }
@@ -211,11 +213,11 @@ public class OrderManager {
             }
         }
         // Start threads, one per server
-        for(Thread thread : sendThreads.values()) {
+        for (Thread thread : sendThreads.values()) {
             thread.start();
         }
         // Wait for all threads to finish
-        for(Thread thread : sendThreads.values()) {
+        for (Thread thread : sendThreads.values()) {
             try {
                 thread.join();
             } catch (InterruptedException e) { }
diff --git a/vlma-core/src/main/java/org/videolan/vlma/order/watcher/DirectMulticastStreamWatcher.java b/vlma-core/src/main/java/org/videolan/vlma/order/watcher/DirectMulticastStreamWatcher.java
index 4777515..e6e58f4 100644
--- a/vlma-core/src/main/java/org/videolan/vlma/order/watcher/DirectMulticastStreamWatcher.java
+++ b/vlma-core/src/main/java/org/videolan/vlma/order/watcher/DirectMulticastStreamWatcher.java
@@ -56,7 +56,7 @@ public class DirectMulticastStreamWatcher implements StreamWatcher {
      * The minimal length of the string to consider that the media is
      * broadcasted
      */
-    private static final int BUF_LENGHT_MIN = 100;
+    private static final int BUF_LENGTH_MIN = 100;
 
     /**
      * The time leaved to the multicast socket to get data.
@@ -86,15 +86,15 @@ public class DirectMulticastStreamWatcher implements StreamWatcher {
             try {
                 isReceivingData.set(true);
                 startWaitingForTheSocket();
-                long bufLenght = 0;
+                long bufLength = 0;
                 while (isReceivingData.get()) {
                     s.receive(recv);
-                    bufLenght += recv.getLength();
+                    bufLength += recv.getLength();
                     /*
                      * If the minimum data quantity has been received,
                      * then ...
                      */
-                    if (bufLenght >= BUF_LENGHT_MIN) {
+                    if (bufLength >= BUF_LENGTH_MIN) {
                         /* It is no more necessary to wait */
                         isReceivingData.set(false);
                         waitThread.interrupt();
@@ -105,15 +105,15 @@ public class DirectMulticastStreamWatcher implements StreamWatcher {
                  * This is a dirty test but I haven't seen something
                  * else at this moment
                  */
-                if (bufLenght >= BUF_LENGHT_MIN) {
+                if (bufLength >= BUF_LENGTH_MIN) {
                     /*
                      * If some data has been retrieved, then
                      * the stream must be broadcasted
                      */
-                    logger.log(Level.DEBUG, "Some data has been received : " + bufLenght + " bytes.");
+                    logger.log(Level.DEBUG, "Some data has been received : " + bufLength + " bytes.");
                     isPlayed = true;
                 } else {
-                    logger.log(Level.DEBUG, "Not enough data received (" + bufLenght + " bytes) verifying the program " + program.getSapName());
+                    logger.log(Level.DEBUG, "Not enough data received (" + bufLength + " bytes) verifying the program " + program.getSapName());
                 }
             } catch (InterruptedIOException e) {
                 logger.log(Level.DEBUG, "Socket TimeOut verifying the channel " + program.getSapName() + ".");



More information about the vlma-devel mailing list