From b06772c0f2a85c0cacb15b720992ee02de94f5ef Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sun, 24 Aug 2014 15:53:14 +0200 Subject: fixed data-update structure --- src/daq/flumotion-plug/sfive.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/daq') 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))); -- cgit v1.2.3