siproxd: use UCI callback processing, reduce code size
authorguidosarducci <guidosarducci@users.noreply.github.com>
Sat, 3 Mar 2018 22:15:41 +0000 (14:15 -0800)
committerguidosarducci <guidosarducci@users.noreply.github.com>
Sun, 18 Mar 2018 01:34:16 +0000 (18:34 -0700)
commit09f32fb1a59249f81d52a5f681496e88959cf26b
tree40571f29a40360eb461cfc26bcedac4a692fe90f
parent25bb8873b7c240014a1b720d30c52ed1f13689a9
siproxd: use UCI callback processing, reduce code size

Switch to using callback functions for UCI config processing, and remove
the unnecessary scan_interfaces() call together with related code.

Instead of explicitly handling every possible siproxd config option, use
callbacks to deal with those defined in the UCI config file, and directly
handle only selected options with desired default values. This shrinks
the init code by ~3.5 KB and simplifies updating to future siproxd
versions with new options.

(Note: this change exposed some long-standing, broken aspects of UCI
callback handling, fixed in https://github.com/openwrt/openwrt/pull/805.)

Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
net/siproxd/files/siproxd.init