Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Xiph.Org
Icecast-Server
Commits
5d815f22
Commit
5d815f22
authored
May 28, 2018
by
Philipp Schafft
🦁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Feature: Added a global module container object
parent
bb776600
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
2 deletions
+8
-2
src/global.c
src/global.c
+4
-0
src/global.h
src/global.h
+2
-0
src/main.c
src/main.c
+2
-2
No files found.
src/global.c
View file @
5d815f22
...
@@ -21,6 +21,8 @@
...
@@ -21,6 +21,8 @@
#include "common/avl/avl.h"
#include "common/avl/avl.h"
#include "global.h"
#include "global.h"
#include "refobject.h"
#include "module.h"
#include "source.h"
#include "source.h"
ice_global_t
global
;
ice_global_t
global
;
...
@@ -36,12 +38,14 @@ void global_initialize(void)
...
@@ -36,12 +38,14 @@ void global_initialize(void)
global
.
clients
=
0
;
global
.
clients
=
0
;
global
.
sources
=
0
;
global
.
sources
=
0
;
global
.
source_tree
=
avl_tree_new
(
source_compare_sources
,
NULL
);
global
.
source_tree
=
avl_tree_new
(
source_compare_sources
,
NULL
);
global
.
modulecontainer
=
module_container_new
();
thread_mutex_create
(
&
_global_mutex
);
thread_mutex_create
(
&
_global_mutex
);
}
}
void
global_shutdown
(
void
)
void
global_shutdown
(
void
)
{
{
thread_mutex_destroy
(
&
_global_mutex
);
thread_mutex_destroy
(
&
_global_mutex
);
refobject_unref
(
global
.
modulecontainer
);
avl_tree_free
(
global
.
source_tree
,
NULL
);
avl_tree_free
(
global
.
source_tree
,
NULL
);
}
}
...
...
src/global.h
View file @
5d815f22
...
@@ -42,6 +42,8 @@ typedef struct ice_global_tag
...
@@ -42,6 +42,8 @@ typedef struct ice_global_tag
/* relays retrieved from master */
/* relays retrieved from master */
relay_server
*
master_relays
;
relay_server
*
master_relays
;
module_container_t
*
modulecontainer
;
cond_t
shutdown_cond
;
cond_t
shutdown_cond
;
}
ice_global_t
;
}
ice_global_t
;
...
...
src/main.c
View file @
5d815f22
...
@@ -122,12 +122,12 @@ static void initialize_subsystems(void)
...
@@ -122,12 +122,12 @@ static void initialize_subsystems(void)
{
{
log_initialize
();
log_initialize
();
thread_initialize
();
thread_initialize
();
global_initialize
();
sock_initialize
();
sock_initialize
();
resolver_initialize
();
resolver_initialize
();
config_initialize
();
config_initialize
();
tls_initialize
();
tls_initialize
();
connection_initialize
();
connection_initialize
();
global_initialize
();
refbuf_initialize
();
refbuf_initialize
();
xslt_initialize
();
xslt_initialize
();
...
@@ -146,12 +146,12 @@ static void shutdown_subsystems(void)
...
@@ -146,12 +146,12 @@ static void shutdown_subsystems(void)
yp_shutdown
();
yp_shutdown
();
stats_shutdown
();
stats_shutdown
();
global_shutdown
();
connection_shutdown
();
connection_shutdown
();
tls_shutdown
();
tls_shutdown
();
config_shutdown
();
config_shutdown
();
resolver_shutdown
();
resolver_shutdown
();
sock_shutdown
();
sock_shutdown
();
global_shutdown
();
thread_shutdown
();
thread_shutdown
();
#ifdef HAVE_CURL
#ifdef HAVE_CURL
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment