diff --git a/src/source.c b/src/source.c index 69af0046..93851cd2 100644 --- a/src/source.c +++ b/src/source.c @@ -60,6 +60,7 @@ #include "event.h" #include "slave.h" #include "acl.h" +#include "navigation.h" #undef CATMODULE #define CATMODULE "source" @@ -105,6 +106,7 @@ source_t *source_reserve (const char *mount) /* make duplicates for strings or similar */ src->mount = strdup(mount); + src->identifier = mount_identifier_new(mount); src->max_listeners = -1; thread_mutex_create(&src->lock); @@ -315,6 +317,7 @@ void source_free_source (source_t *source) /* make sure all YP entries have gone */ yp_remove (source->mount); + refobject_unref(source->identifier); free (source->mount); free (source); diff --git a/src/source.h b/src/source.h index e35e9d90..51babaa3 100644 --- a/src/source.h +++ b/src/source.h @@ -33,7 +33,8 @@ struct source_tag { http_parser_t *parser; time_t client_stats_update; - char *mount; + char *mount; // TODO: Should we at some point migrate away from this to only use identifier? + mount_identifier_t *identifier; /* If this source drops, try to move all clients to this fallback */ char *fallback_mount;