Return an empty set intead of an error when no disco items are available for a host
authorWaqas Hussain <waqas20@gmail.com>
Fri, 26 Dec 2008 16:46:05 +0000 (21:46 +0500)
committerWaqas Hussain <waqas20@gmail.com>
Fri, 26 Dec 2008 16:46:05 +0000 (21:46 +0500)
core/discomanager.lua

index 21080635fcebc48e076e447da5b0c5399094a0eb..fe63f972cc0453eec3193a1970d41737a31f83ce 100644 (file)
@@ -41,6 +41,11 @@ do
                        return true;\r
                end\r
        end);\r
+       helper:addDiscoItemsHandler("*host", function(reply, to, from, node)
+               if hosts[to] and hosts[to].type == "local" then
+                       return true;
+               end
+       end);
 end\r
 \r
 module "discomanager"\r