]> git.meshlink.io Git - catta/blobdiff - avahi-utils/avahi-bookmarks.in
* Move the D-BUS configured but not compiled in warning, and make it work right.
[catta] / avahi-utils / avahi-bookmarks.in
index 953020a5978f93a825931e602dadef89eb5de815..ce8eba13b073e7939fe5640a11f8a4455047b8df 100755 (executable)
@@ -59,7 +59,7 @@ class AvahiBookmarks(resource.Resource):
         self.browse_service_type("_http._tcp")
 
         # Hurrah! if I enable one of the following lines, python segfaults.
-        #self.browse_service_type("_shttp._tcp")
+        #self.browse_service_type("_https._tcp")
         #self.browse_service_type("_ftp._tcp")
 
     def browse_service_type(self, stype):
@@ -96,7 +96,12 @@ class AvahiBookmarks(resource.Resource):
 
                 path = self.find_path(v[4])
 
-                t += '<li><a href="%s://%s%s%s">%s</a></li>' % (urlproto[k[3]], v[2], port, path, k[2])
+                if v[1] == avahi.PROTO_INET6:
+                    ip = "[" + v[2] + "]"
+                else:
+                    ip = v[2]
+
+                t += '<li><a href="%s://%s%s%s">%s</a></li>' % (urlproto[k[3]], ip, port, path, k[2])
                 
             t += '</ul>'