If Android is on it's way to suspend when stopBrowser() is called, we need
to call nsd.stopServiceDiscovery() synchronously to force it to run
before the device goes to sleep.
Was an issue on Android 10 on Levono Tab M10 FHD Plus
TB-X606FA_S300554-220630_BMP
If Android is on it's way to suspend when stopServicePublish() is called,
we need to call nsd.unregisterService() synchronously to force it to run
before the device goes to sleep. If instead it is scheduled to run in the
Android thread, it will not run until the device is woken back up.
The publish service name and type are passed to startServicePublish() as
char pointers. startServicePublish() calls runOnAndroidThread which asks
the java code to run registerService(). If name and type are objects on
the stack, they could get freed / deleted before the registerService() is
run in the java thread which would cause registerService() to use deleted
objects. Fix --> make permanent objects for name and type.
This updates the include path used when this project is used/consumed
via find_package(). The include paths no longer need to be prefixed
with 'QtZeroConf', and so now they can be included the same regardless
of whether this project is being used via FetchContent or find_package
Signed-off-by: Marc Reilly <marc@cpdesign.com.au>
because the `addressNotifier` of the `Resolver` is deleted after a new
`QSocketNotifier` has been created. That means there are two socket
notifiers for the same socket for a brief moment causing this warning.
Unfortunately, there is no FindAvahi.cmake file available. Instead use
find_library and find_path to find the libavahi-client.so and
avahi-client/client.h files. This improves logging if the files are not found
and allows to use CMAKE_FIND_ROOT_PATH to alter the search paths for
crossplatform builds.
TXT record values can also contain equals signs. The current
implementation would consider any record where the value contains an
equals sign as an empty record.
TXT record values can also contain equals signs. The current
implementation would consider any record where the value contains an
equals sign as an empty record.