Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Xiph.Org
Icecast-Server
Commits
3116f62a
Commit
3116f62a
authored
Aug 30, 2005
by
Karl Heyes
Browse files
extra checks on YP updating, typically on changes over HUP
svn path=/icecast/trunk/icecast/; revision=9862
parent
1d5c1ebd
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/yp.c
View file @
3116f62a
...
...
@@ -601,7 +601,7 @@ static void check_servers ()
ypdata_t
*
yp
;
source_t
*
source
=
node
->
key
;
if
((
yp
=
create_yp_entry
(
source
->
mount
))
!=
NULL
)
if
(
source
->
yp_public
&&
(
yp
=
create_yp_entry
(
source
->
mount
))
!=
NULL
)
{
DEBUG1
(
"Adding existing mount %s"
,
source
->
mount
);
yp
->
server
=
server
;
...
...
@@ -830,17 +830,26 @@ void yp_add (const char *mount)
while
(
server
)
{
ypdata_t
*
yp
;
/* add new ypdata to each servers pending yp */
if
((
yp
=
create_yp_entry
(
mount
))
!=
NULL
)
/* on-demand relays may already have a YP entry */
yp
=
find_yp_mount
(
server
->
mounts
,
mount
);
if
(
yp
==
NULL
)
{
DEBUG2
(
"Adding %s to %s"
,
mount
,
server
->
url
);
yp
->
server
=
server
;
yp
->
touch_interval
=
server
->
touch_interval
;
yp
->
next
=
server
->
pending_mounts
;
yp
->
next_update
=
time
(
NULL
)
+
5
;
server
->
pending_mounts
=
yp
;
yp_update
=
1
;
/* add new ypdata to each servers pending yp */
yp
=
create_yp_entry
(
mount
);
if
(
yp
)
{
DEBUG2
(
"Adding %s to %s"
,
mount
,
server
->
url
);
yp
->
server
=
server
;
yp
->
touch_interval
=
server
->
touch_interval
;
yp
->
next
=
server
->
pending_mounts
;
yp
->
next_update
=
time
(
NULL
)
+
5
;
server
->
pending_mounts
=
yp
;
yp_update
=
1
;
}
}
else
DEBUG1
(
"YP entry %s already exists"
,
mount
);
server
=
server
->
next
;
}
thread_mutex_unlock
(
&
yp_pending_lock
);
...
...
Write
Preview
Supports
Markdown
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