[Slim-Checkins] r10196 - in /trunk/server: Changelog6.html
Plugins/CLI.pm Slim/Web/HTTP.pm slimserver.pl
dsully at svn.slimdevices.com
dsully at svn.slimdevices.com
Wed Oct 4 15:43:21 PDT 2006
Author: dsully
Date: Wed Oct 4 15:43:17 2006
New Revision: 10196
URL: http://svn.slimdevices.com?rev=10196&view=rev
Log:
Bug: 4291
Description: Restart mDNS advertising when ports change.
Modified:
trunk/server/Changelog6.html
trunk/server/Plugins/CLI.pm
trunk/server/Slim/Web/HTTP.pm
trunk/server/slimserver.pl
Modified: trunk/server/Changelog6.html
URL: http://svn.slimdevices.com/trunk/server/Changelog6.html?rev=10196&r1=10195&r2=10196&view=diff
==============================================================================
--- trunk/server/Changelog6.html (original)
+++ trunk/server/Changelog6.html Wed Oct 4 15:43:17 2006
@@ -51,6 +51,7 @@
<li><a href="http://bugs.slimdevices.com/show_bug.cgi?id=4245">#4245</a> - Pressing PLAY on top level browse pushes right</li>
<li><a href="http://bugs.slimdevices.com/show_bug.cgi?id=4270">#4270</a> - Server Information on SB - two items muddled up</li>
<li><a href="http://bugs.slimdevices.com/show_bug.cgi?id=4281">#4281</a> - Mix do not work with accented characters in filenames and paths</li>
+ <li><a href="http://bugs.slimdevices.com/show_bug.cgi?id=4291">#4291</a> - if you change the http or cli port, mdns doesn't update its advertisements</li>
</ul>
</ul>
Modified: trunk/server/Plugins/CLI.pm
URL: http://svn.slimdevices.com/trunk/server/Plugins/CLI.pm?rev=10196&r1=10195&r2=10196&view=diff
==============================================================================
--- trunk/server/Plugins/CLI.pm (original)
+++ trunk/server/Plugins/CLI.pm Wed Oct 4 15:43:17 2006
@@ -121,7 +121,6 @@
return (\%setupGroup, \%setupPrefs);
}
-
# plugin: shutdown the CLI
sub shutdownPlugin {
@@ -139,6 +138,9 @@
# close the socket
cli_socket_close();
+
+ # and restart mDNS without the cli port.
+ Slim::Networking::mDNS->startAdvertising;
}
# plugin strings at the end of the file
@@ -176,7 +178,6 @@
}
}
-
# open or change our socket
sub cli_socket_change {
@@ -198,6 +199,8 @@
if ($newport) {
cli_socket_open($newport);
}
+
+ Slim::Networking::mDNS->startAdvertising;
}
}
Modified: trunk/server/Slim/Web/HTTP.pm
URL: http://svn.slimdevices.com/trunk/server/Slim/Web/HTTP.pm?rev=10196&r1=10195&r2=10196&view=diff
==============================================================================
--- trunk/server/Slim/Web/HTTP.pm (original)
+++ trunk/server/Slim/Web/HTTP.pm Wed Oct 4 15:43:17 2006
@@ -161,11 +161,13 @@
}
sub adjustHTTPPort {
+
# do this on a timer so current page can be updated first and it executed outside select
Slim::Utils::Timers::setTimer(undef, Time::HiRes::time() + 0.5, \&_adjustHTTPPortCallback);
}
sub _adjustHTTPPortCallback {
+
# if we've already opened a socket, let's close it
if ($openedport) {
@@ -181,7 +183,11 @@
# open new port if specified
if (Slim::Utils::Prefs::get('httpport')) {
+
Slim::Web::HTTP::openport(Slim::Utils::Prefs::get('httpport'), $::httpaddr, $Bin);
+
+ # Need to restart mDNS after changing the HTTP port.
+ Slim::Networking::mDNS->startAdvertising;
}
}
Modified: trunk/server/slimserver.pl
URL: http://svn.slimdevices.com/trunk/server/slimserver.pl?rev=10196&r1=10195&r2=10196&view=diff
==============================================================================
--- trunk/server/slimserver.pl (original)
+++ trunk/server/slimserver.pl Wed Oct 4 15:43:17 2006
@@ -400,14 +400,14 @@
$::d_server && msg("SlimServer HTTP init...\n");
Slim::Web::HTTP::init();
+ $::d_server && msg("Source conversion init..\n");
+ Slim::Player::Source::init();
+
+ $::d_server && msg("SlimServer Plugins init...\n");
+ Slim::Utils::PluginManager::init();
+
$::d_server && msg("mDNS startAdvertising...\n");
Slim::Networking::mDNS->startAdvertising;
-
- $::d_server && msg("Source conversion init..\n");
- Slim::Player::Source::init();
-
- $::d_server && msg("SlimServer Plugins init...\n");
- Slim::Utils::PluginManager::init();
$::d_server && msg("SlimServer checkDataSource...\n");
checkDataSource();
More information about the checkins
mailing list