summaryrefslogtreecommitdiff
path: root/src/daq
diff options
context:
space:
mode:
Diffstat (limited to 'src/daq')
-rw-r--r--src/daq/flumotion-plug/s5.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/daq/flumotion-plug/s5.py b/src/daq/flumotion-plug/s5.py
index bd26698..2ca57e9 100644
--- a/src/daq/flumotion-plug/s5.py
+++ b/src/daq/flumotion-plug/s5.py
@@ -147,10 +147,10 @@ class ComponentSFivePlug(base.ComponentPlug):
def _socketReady(self):
self.info('SFive: connection to sfive hub established')
- self._old_bytes_received = -1
- self._old_bytes_sent = -1
self._sendInit()
if self._sfivepoller:
+ self._old_bytes_received = self._component.getBytesReceived()
+ self._old_bytes_sent = self._component.getBytesSent()
self._start_time = datetime.datetime.utcnow()
self._sfivepoller.start()
@@ -165,9 +165,9 @@ class ComponentSFivePlug(base.ComponentPlug):
bytes_received = self._component.getBytesReceived()
bytes_sent = self._component.getBytesSent()
- bytes_received_diff = bytes_received - self._old_bytes_received if self._old_bytes_received > 0 else 0;
+ bytes_received_diff = bytes_received - self._old_bytes_received
self._old_bytes_received = bytes_received
- bytes_sent_diff = bytes_sent - self._old_bytes_sent if self._old_bytes_sent > 0 else 0;
+ bytes_sent_diff = bytes_sent - self._old_bytes_sent
self._old_bytes_sent = bytes_sent
data = { "start-time": self._start_time.isoformat('T'),