Commit 389a9a57 authored by sletz's avatar sletz
Browse files

Correct Start/Stop for Control API.

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4536 0c269be4-1314-0410-8aa9-9f06e86f4224
parent a6b78ded
......@@ -35,12 +35,20 @@ Chris Caudle
Jackdmp changes log
---------------------------
2011-06-28 Stephane Letz <letz@grame.fr>
2011-08-31 Stephane Letz <letz@grame.fr>
* Correct Start/Stop for Control API.
2011-08-30 Stephane Letz <letz@grame.fr>
* Check driver type in jackdmp.cpp.
2011-08-28 Stephane Letz <letz@grame.fr>
* Correct JackBasePosixMutex::Trylock.
* Correct JackMessageBuffer::Execute.
2011-06-26 Stephane Letz <letz@grame.fr>
2011-08-26 Stephane Letz <letz@grame.fr>
* More robust code in synchronization primitives and in JackMessageBuffer.
* Non blocking notifications in JackEngine::NotifyAddClient and JackEngine::NotifyRemoveClient.
......
......@@ -409,7 +409,7 @@ extern "C"
value.ui = 1U;
jack_driver_descriptor_add_parameter(desc, &filler, "transport-sync", 't', JackDriverParamUInt, &value, NULL, "Sync transport with master's", NULL);
value.ui = 2U;
value.ui = 5U;
jack_driver_descriptor_add_parameter(desc, &filler, "latency", 'l', JackDriverParamUInt, &value, NULL, "Network latency", NULL);
value.i = 0;
......
......@@ -846,13 +846,13 @@ extern "C"
desc = jack_driver_descriptor_construct("netmanager", JackDriverNone, "netjack multi-cast master component", &filler);
strcpy(value.str, DEFAULT_MULTICAST_IP);
jack_driver_descriptor_add_parameter(desc, &filler, "multicast_ip", 'a', JackDriverParamString, &value, NULL, "Multicast Address", NULL);
jack_driver_descriptor_add_parameter(desc, &filler, "multicast-ip", 'a', JackDriverParamString, &value, NULL, "Multicast Address", NULL);
value.i = DEFAULT_PORT;
jack_driver_descriptor_add_parameter(desc, &filler, "udp_net_port", 'p', JackDriverParamInt, &value, NULL, "UDP port", NULL);
jack_driver_descriptor_add_parameter(desc, &filler, "udp-net-port", 'p', JackDriverParamInt, &value, NULL, "UDP port", NULL);
value.i = false;
jack_driver_descriptor_add_parameter(desc, &filler, "auto_connect", 'c', JackDriverParamBool, &value, NULL, "Auto connect netmaster to system ports", NULL);
jack_driver_descriptor_add_parameter(desc, &filler, "auto-connect", 'c', JackDriverParamBool, &value, NULL, "Auto connect netmaster to system ports", NULL);
return desc;
}
......
......@@ -187,6 +187,8 @@ int JackServer::Start()
int JackServer::Stop()
{
jack_log("JackServer::Stop");
fChannel.Stop();
if (fFreewheel) {
return fThreadedFreewheelDriver->Stop();
} else {
......
......@@ -532,7 +532,7 @@ int main(int argc, char* argv[])
jackctl_wait_signals(signals);
stop_server:
if (! jackctl_server_stop(server_ctl)) {
if (!jackctl_server_stop(server_ctl)) {
fprintf(stderr, "Cannot stop server...\n");
}
......
......@@ -66,8 +66,7 @@ int JackSocketServerChannel::Open(const char* server_name, JackServer* server)
void JackSocketServerChannel::Close()
{
fThread.Stop();
fRequestListenSocket.Close();
fRequestListenSocket.Close();
// Close remaining client sockets
std::map<int, std::pair<int, JackClientSocket*> >::iterator it;
......@@ -85,9 +84,14 @@ int JackSocketServerChannel::Start()
if (fThread.Start() != 0) {
jack_error("Cannot start Jack server listener");
return -1;
} else {
return 0;
}
}
return 0;
void JackSocketServerChannel::Stop()
{
fThread.Kill();
}
void JackSocketServerChannel::ClientCreate()
......
......@@ -63,6 +63,7 @@ class JackSocketServerChannel : public JackRunnableInterface
void Close(); // Close the Server/Client connection
int Start();
void Stop();
// JackRunnableInterface interface
bool Init();
......
......@@ -486,7 +486,6 @@ void JackWinNamedPipeServerChannel::Close()
fThread.Stop();
*/
fThread.Kill();
fRequestListenPipe.Close();
}
......@@ -495,9 +494,14 @@ int JackWinNamedPipeServerChannel::Start()
if (fThread.Start() != 0) {
jack_error("Cannot start Jack server listener");
return -1;
} else {
return 0;
}
}
return 0;
void JackWinNamedPipeServerChannel::Stop()
{
fThread.Kill();
}
bool JackWinNamedPipeServerChannel::Init()
......
......@@ -93,6 +93,7 @@ class JackWinNamedPipeServerChannel : public JackRunnableInterface
void Close(); // Close the Server/Client connection
int Start();
void Stop();
// JackRunnableInterface interface
bool Init();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment