msmith - in flumotion/trunk: . flumotion/component/consumers/httpstreamer

flumotion-commit at lists.fluendo.com flumotion-commit at lists.fluendo.com
Wed May 16 16:13:56 CEST 2007


Author: msmith
Date: Wed May 16 16:13:53 2007
New Revision: 4971

Modified:
   flumotion/trunk/ChangeLog
   flumotion/trunk/flumotion/component/consumers/httpstreamer/http.py
Log:
        * flumotion/component/consumers/httpstreamer/http.py:
          The wizard used (and still does, actually) set bandwidth-limit to
          unreasonably low values, thinking it was in Mb/s (it's b/s).
          If the bandwidth-limit is < 1000 bps, multiply by 1e6 to make it
          sensible.



Modified: flumotion/trunk/ChangeLog
==============================================================================
--- flumotion/trunk/ChangeLog	(original)
+++ flumotion/trunk/ChangeLog	Wed May 16 16:13:53 2007
@@ -1,3 +1,11 @@
+2007-05-16  Michael Smith <msmith at fluendo.com>
+
+	* flumotion/component/consumers/httpstreamer/http.py:
+	  The wizard used (and still does, actually) set bandwidth-limit to
+	  unreasonably low values, thinking it was in Mb/s (it's b/s).
+	  If the bandwidth-limit is < 1000 bps, multiply by 1e6 to make it
+	  sensible.
+
 2007-05-16  Thomas Vander Stichele  <thomas at apestaart dot org>
 
 	* flumotion/component/misc/httpfile/httpfile.xml:

Modified: flumotion/trunk/flumotion/component/consumers/httpstreamer/http.py
==============================================================================
--- flumotion/trunk/flumotion/component/consumers/httpstreamer/http.py	(original)
+++ flumotion/trunk/flumotion/component/consumers/httpstreamer/http.py	Wed May 16 16:13:53 2007
@@ -467,7 +467,13 @@
             self.resource.setUserLimit(int(properties['client-limit']))
 
         if properties.has_key('bandwidth-limit'):
-            self.resource.setBandwidthLimit(int(properties['bandwidth-limit']))
+            limit = int(properties['bandwidth-limit'])
+            if limit < 1000:
+                # The wizard used to set this as being in Mbps, oops.
+                self.debug("Bandwidth limit set to unreasonably low %d bps, "
+                    "assuming this is meant to be Mbps", limit)
+                limit *= 1000000
+            self.resource.setBandwidthLimit(limit)
 
         if properties.has_key('redirect-on-overflow'):
             self.resource.setRedirectionOnLimits(


More information about the flumotion-commit mailing list