mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2024-12-04 14:46:30 -05:00
Feature: Added identifier to source_t
This commit is contained in:
parent
673dfb734c
commit
31659b3ed1
@ -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);
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user