From: Jo-Philipp Wich Date: Fri, 5 Sep 2008 23:54:44 +0000 (+0000) Subject: * luci/applications/uvc-streamer: fix possible crash when no uvc_streamer sections... X-Git-Tag: 0.8.0~118 X-Git-Url: https://git.archive.openwrt.org/?a=commitdiff_plain;h=4f3c67df4103c00c764d58b76cd95468fad5a738;p=project%2Fluci.git * luci/applications/uvc-streamer: fix possible crash when no uvc_streamer sections is defined in config --- diff --git a/applications/luci-uvc_streamer/luasrc/model/cbi/uvc_streamer.lua b/applications/luci-uvc_streamer/luasrc/model/cbi/uvc_streamer.lua index 2054185d4..2e0627ec8 100644 --- a/applications/luci-uvc_streamer/luasrc/model/cbi/uvc_streamer.lua +++ b/applications/luci-uvc_streamer/luasrc/model/cbi/uvc_streamer.lua @@ -21,6 +21,9 @@ local port uci:foreach( "uvc_streamer", "uvc_streamer", function(section) port = port or tonumber(section.port) end ) +addr = addr or "192.168.1.1" +port = port or 8080 + m = Map("uvc_streamer", translate("uvc_streamer"), translatef("uvc_streamer_desc", nil, addr, port, addr, port))