applications/luci-olsr: Use 100ms timeout for dns requests via nixio.getnameinfo
authorManuel Munz <freifunk@somakoma.de>
Sun, 17 Mar 2013 12:21:30 +0000 (12:21 +0000)
committerManuel Munz <freifunk@somakoma.de>
Sun, 17 Mar 2013 12:21:30 +0000 (12:21 +0000)
applications/luci-olsr/luasrc/controller/olsr.lua

index c1b6ed9f444a268b0a426f0f60523999450efb71..fd616ab630fa2e8e35cf0b1f400e6a1b0d52f7fc 100644 (file)
@@ -134,7 +134,7 @@ function action_neigh(json)
 
        for k, v in ipairs(data) do
                if resolve == "1" then
 
        for k, v in ipairs(data) do
                if resolve == "1" then
-                       hostname = nixio.getnameinfo(v.remoteIP)
+                       hostname = nixio.getnameinfo(v.remoteIP, nil, 100)
                        if hostname then
                                v.hostname = hostname
                        end
                        if hostname then
                                v.hostname = hostname
                        end
@@ -159,7 +159,7 @@ function action_routes()
 
        for k, v in ipairs(data) do
                if resolve == "1" then
 
        for k, v in ipairs(data) do
                if resolve == "1" then
-                       local hostname = nixio.getnameinfo(v.gateway)
+                       local hostname = nixio.getnameinfo(v.gateway, nil, 100)
                        if hostname then
                                v.hostname = hostname
                        end
                        if hostname then
                                v.hostname = hostname
                        end
@@ -215,7 +215,7 @@ function action_hna()
 
        for k, v in ipairs(data) do
                if resolve == "1" then
 
        for k, v in ipairs(data) do
                if resolve == "1" then
-                       hostname = nixio.getnameinfo(v.gateway)
+                       hostname = nixio.getnameinfo(v.gateway, nil, 100)
                        if hostname then
                                v.hostname = hostname
                        end
                        if hostname then
                                v.hostname = hostname
                        end