diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/daq/flumotion-plug/sfive.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/daq/flumotion-plug/sfive.py b/src/daq/flumotion-plug/sfive.py index 5ec00bd..2b00b80 100644 --- a/src/daq/flumotion-plug/sfive.py +++ b/src/daq/flumotion-plug/sfive.py @@ -137,7 +137,7 @@ class ComponentSFivePlug(base.ComponentPlug): initdata = { "hostname": self._hostname, "streamer-id": { "content-id": self._content_id, "format": self._format, "quality": self._quality }, "tags": self._tags } - self._proto.sendDatagram(json.dumps(initdata)); + self._proto.sendDatagram('%s\n' % (json.dumps(initdata))); def _updateSFive(self): client_count = self._component.getClients() @@ -151,7 +151,10 @@ class ComponentSFivePlug(base.ComponentPlug): data = { "start-time": datetime.datetime.utcnow().isoformat('Z'), "duration-ms": self._duration * 1000, - "client-count": client_count, - "bytes-received": bytes_received_diff, - "bytes-sent": bytes_sent_diff } - self._proto.sendDatagram(json.dumps(data)); + "data": { + "client-count": client_count, + "bytes-received": bytes_received_diff, + "bytes-sent": bytes_sent_diff + } + } + self._proto.sendDatagram('%s\n' % (json.dumps(data))); |