]> git.meshlink.io Git - catta/commitdiff
small fix
authorLennart Poettering <lennart@poettering.net>
Sun, 21 Aug 2005 13:12:24 +0000 (13:12 +0000)
committerLennart Poettering <lennart@poettering.net>
Sun, 21 Aug 2005 13:12:24 +0000 (13:12 +0000)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@379 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

avahi-utils/avahi-publish-service.in

index 0f278eba66a09ac9b54205157191513f500a5132..41cc5d49bc224b6c968a62053879b373210ce798 100755 (executable)
@@ -83,17 +83,19 @@ def add_service():
 
     if group is None:
         group = dbus.Interface(bus.get_object(avahi.DBUS_NAME, server.EntryGroupNew()), avahi.DBUS_INTERFACE_ENTRY_GROUP)
-
+        group.connect_to_signal('StateChanged', entry_group_state_changed)
+        
     assert group.IsEmpty()
 
     print "Adding service '%s' of type '%s' ..." % (name, stype)
-    group.connect_to_signal('StateChanged', entry_group_state_changed)
 
     group.AddService(avahi.IF_UNSPEC, avahi.PROTO_UNSPEC, name, stype, domain, host, dbus.UInt16(port), avahi.string_array_to_txt_array(txt))
     group.Commit()
 
 def entry_group_state_changed(state):
     global name, server, n_rename
+
+#    print "state change: %i" % state
     
     if state == avahi.ENTRY_GROUP_ESTABLISHED:
         print "Service established."