Empty addresses are valid, meaning the buddy own address.

For group (multicast) services publisher_address != service_address,
introduce the distinction in the API and in the avahi announcement.
This commit is contained in:
Marco Pesenti Gritti
2006-06-17 22:06:20 -04:00
parent 53f00b05b1
commit 6d7940949a
3 changed files with 20 additions and 7 deletions
+3 -1
View File
@@ -1,4 +1,5 @@
import base64
import logging
import pygtk
pygtk.require('2.0')
@@ -65,7 +66,8 @@ class Buddy(gobject.GObject):
True if the service was successfully added, and False if it was not."""
if service.get_name() != self._nick_name:
return False
if service.get_address() != self._address:
if service.get_publisher_address() != self._address:
logging.error('Service publisher and buddy address doesnt match: %s %s' % (service.get_publisher_address(), self._address))
return False
if service.get_type() in self._services.keys():
return False