Ticket #320: service.py_patch

File service.py_patch, 1.0 kB (added by porthose, 2 years ago)

patch for service.py

Line 
1 --- coherence/service.py        2010-08-24 16:23:50.000000000 +0200
2 +++ coherence/upnp/core/service.py      2010-08-24 16:21:23.000000000 +0200
3 @@ -368,6 +368,12 @@
4              self.detection_completed = True
5              louie.send('Coherence.UPnP.Service.detection_completed', sender=self.device, device=self.device)
6              self.info("send signal Coherence.UPnP.Service.detection_completed for %r" % self)
7 +            if self.last_time_updated == None:
8 +                # The clients (e.g. media_server_client) check for last time to detect whether service detection is complete
9 +                # so we need to set it here and now to avoid a potential race condition
10 +                self.last_time_updated = time.time()
11 +                louie.send('Coherence.UPnP.DeviceClient.Service.notified', sender=self.device, service=self)
12 +                self.info("send signal Coherence.UPnP.DeviceClient.Service.notified for %r" % self)
13              """
14              if (self.last_time_updated == None):
15                  if( self.id.endswith('AVTransport') or