[PATCH] fix avahi AddService() call

The attached patch fixes the avahi AddService() call in Peers.py.  I'm testing on openSUSE 11.0 Alpha2.  The 3rd and 8th parameters of AddService() are being marshaled as ints rather than an unsigned int and an unsigned short, like the avahi introspection file says.  Please CC me on any replies.

Index: conduit/modules/NetworkModule/Peers.py
--- conduit/modules/NetworkModule/Peers.py	(revision 1369)
+++ conduit/modules/NetworkModule/Peers.py	(working copy)
@@ -159,12 +159,12 @@
                 IF_UNSPEC,        #interface
                 PROTO_UNSPEC,     #protocol
-                0,                      #flags
+                dbus.UInt32(0),         #flags
                 self.hostname,          #name
                 AVAHI_SERVICE_NAME,     #service type
                 AVAHI_SERVICE_DOMAIN,   #domain
                 '',                     #host
-                self.port,              #port
+                dbus.UInt16(self.port), #port
                 string_array_to_txt_array(["version=%s" % conduit.VERSION])

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]