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 10:37:51 +0000 (03:37 -0700)
commit5dcf61c0813702ea0df65695c65749191b9996d7
tree5760a8a39dd6e084edf34a8f8543abf03e6a14ca
parent1b6e890b835adc39f3581461efc88115b6ed3337
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