Signed-off-by: Ralph Boehme <rb@sernet.de>
* FIX: Spotlight: fix for long running queries
* UPD: afpd: distribute SIGHUP from parent afpd to children and force
reload shares
* FIX: Spotlight: fix for long running queries
* UPD: afpd: distribute SIGHUP from parent afpd to children and force
reload shares
+* FIX: netatalk: refresh Zeroconf registration when receiving SIGHUP
Changes in 3.1.5
================
Changes in 3.1.5
================
* Call this function from inside this thread.
*/
int av_zeroconf_unregister() {
* Call this function from inside this thread.
*/
int av_zeroconf_unregister() {
- LOG(log_error, logtype_afpd, "av_zeroconf_unregister");
+ LOG(log_debug, logtype_afpd, "av_zeroconf_unregister");
- LOG(log_error, logtype_afpd, "av_zeroconf_unregister: avahi_threaded_poll_stop");
if (ctx->threaded_poll)
avahi_threaded_poll_stop(ctx->threaded_poll);
if (ctx->threaded_poll)
avahi_threaded_poll_stop(ctx->threaded_poll);
- LOG(log_error, logtype_afpd, "av_zeroconf_unregister: avahi_client_free");
if (ctx->client)
avahi_client_free(ctx->client);
if (ctx->client)
avahi_client_free(ctx->client);
- LOG(log_error, logtype_afpd, "av_zeroconf_unregister: avahi_threaded_poll_free");
if (ctx->threaded_poll)
avahi_threaded_poll_free(ctx->threaded_poll);
free(ctx);
if (ctx->threaded_poll)
avahi_threaded_poll_free(ctx->threaded_poll);
free(ctx);
static void sighup_cb(evutil_socket_t fd, short what, void *arg)
{
LOG(log_note, logtype_afpd, "Received SIGHUP, sending all processes signal to reload config");
static void sighup_cb(evutil_socket_t fd, short what, void *arg)
{
LOG(log_note, logtype_afpd, "Received SIGHUP, sending all processes signal to reload config");
+
+ if (!(obj.options.flags & OPTION_NOZEROCONF)) {
+ zeroconf_deregister();
+ load_volumes(&obj, lv_all | lv_force);
+ zeroconf_register(&obj);
+ LOG(log_note, logtype_default, "Re-registered with Zeroconf");
+ }
+
kill_childs(SIGHUP, &afpd_pid, &cnid_metad_pid, NULL);
}
kill_childs(SIGHUP, &afpd_pid, &cnid_metad_pid, NULL);
}
/* Now register with zeroconf, we also need the volumes for that */
if (! (obj.options.flags & OPTION_NOZEROCONF)) {
/* Now register with zeroconf, we also need the volumes for that */
if (! (obj.options.flags & OPTION_NOZEROCONF)) {
- LOG(log_note, logtype_default, "Registering with Zeroconf");
- LOG(log_note, logtype_default, "done");
+ LOG(log_note, logtype_default, "Registered with Zeroconf");
}
/* run the event loop */
}
/* run the event loop */