procd: mdns: Support txt values with spaces
authorKarl Palsson <karlp@etactica.com>
Wed, 30 Aug 2017 17:44:00 +0000 (17:44 +0000)
committerJohn Crispin <john@phrozen.org>
Fri, 1 Sep 2017 06:58:09 +0000 (08:58 +0200)
commit7a423c389a162d2945901f0b5e7c604d36c64526
treeb990946ed263f0fb6ced2cf06b991e329e0837f0
parent12930fc0453ac019e3f9a9cde50699914f7ba1d0
procd: mdns: Support txt values with spaces

Properly quote the arguments so that you can register a service with TXT
entries that contains spaces.

Example:
   procd_add_mdns myservice tcp 9999 "key=descriptive text field 1" \
         "another=something equally verbose"

Output before:
$ avahi-browse -r -v _myservice._tcp
_myservice._tcp      local
   hostname = [blah.local]
   address = [192.168.255.74]
   port = [9999]
   txt = ["verbose" "equally" "another=something" "1" "field" "text" "key=descriptive"]

Output now:
$ avahi-browse -r -v _myservice._tcp
_myservice._tcp      local
   hostname = [blah.local]
   address = [192.168.255.74]
   port = [9999]
   txt = ["another=something equally verbose" "key=descriptive text field 1"]

Signed-off-by: Karl Palsson <karlp@etactica.com>
package/system/procd/files/procd.sh