machinekit
machinekit copied to clipboard
HAL: mDNS Service Announcement Name Normalization Wait to Merge
This PR addresses https://github.com/machinekit/machinekit-hal/issues/170.
Previously, the published mDNS record was hard-coded by each service that implemented the functionality, sometimes providing the ability for command line options to include hostname, etc. These changes move the formatting to the common machinekit.ini file, allowing for configuration changes to affect all services globally instead of through independent switches.
I have also updated some of the previous services which were announced simply as "Machinekit" making duplication possible. The new default service format is specified as:
(Prefix) (Service Name) on (FQDN).(Service Type).(Domain)
An example for mklauncher status service is:
MK Launcher on machinekit.local._machinekit._tcp.local
By adjusting the format string in machinekit.ini, the services can also publish using the MKUUID rather than hostname. An example using mkuuid and srvtype instead of srvname:
# Format string is "MK $SRVTYPE [$MKUUID]" in machinekit.ini
MK launchercmd [UUID-Removed]._machinekit._tcp.local
Please wait to merge until we can get a few extra testers / review of the changes.
The failure is because all warnings are now treated as errors after @zultron purged all the warnings from the code base (for Jessie and Stretch at least)
machinetalk/lib/mk_service.cc: In function ‘int mk_announce(mk_netopts_t*, mk_socket_t*, const char*, const char*)’:
machinetalk/lib/mk_service.cc:245:66: error: suggest parentheses around assignment used as truth value [-Werror=parentheses]
if(retval = build_dnsname(n, s, name, sizeof(name), headline)) {
Just comply with its nanny knows best parenthesis advice and it should pass :)
@dkhughes When you are happy this is tested and can be submitted, you will need to PR against the machinekit-hal and machinekit-cnc repos. I think this will all go to machinekit-hal, but you will need to check that it contains all the files you want to amend. ( there is some crossover between hal and cnc in some of the python launcher type files, but I think I left most in -hal because -cnc cannot function without it anyway)
@ArcEye No problem. I will rebase on top of machinekit-hal and submit there. All of the code is in that repo. Should I wait a couple days for the changeover to be complete first?
On 27 Feb 2019, at 16:57, dkhughes wrote: @ArcEye No problem. I will rebase on top of machinekit-hal and submit there. All of the code is in that repo. Should I wait a couple days for the changeover to be complete first?
@dkhughes That’s not mandatory, the last PR from @ArcEye has been an update from the machinekit repo up to now. So machinekit-hal is up to date. :)