* Fixed warning.
* Minor cleanup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30044 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
aa6bedf1fb
commit
5bb7f41847
|
@ -124,6 +124,7 @@ private:
|
||||||
typedef BApplication inherited;
|
typedef BApplication inherited;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
ServerApp::ServerApp()
|
ServerApp::ServerApp()
|
||||||
: BApplication(B_MEDIA_SERVER_SIGNATURE),
|
: BApplication(B_MEDIA_SERVER_SIGNATURE),
|
||||||
fLocker(new BLocker("media server locker"))
|
fLocker(new BLocker("media server locker"))
|
||||||
|
@ -142,7 +143,9 @@ ServerApp::ServerApp()
|
||||||
resume_thread(control_thread);
|
resume_thread(control_thread);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ServerApp::ReadyToRun()
|
|
||||||
|
void
|
||||||
|
ServerApp::ReadyToRun()
|
||||||
{
|
{
|
||||||
gNodeManager->LoadState();
|
gNodeManager->LoadState();
|
||||||
gFormatManager->LoadState();
|
gFormatManager->LoadState();
|
||||||
|
@ -155,6 +158,7 @@ void ServerApp::ReadyToRun()
|
||||||
gAddOnManager->LoadState();
|
gAddOnManager->LoadState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ServerApp::~ServerApp()
|
ServerApp::~ServerApp()
|
||||||
{
|
{
|
||||||
TRACE("ServerApp::~ServerApp()\n");
|
TRACE("ServerApp::~ServerApp()\n");
|
||||||
|
@ -185,7 +189,8 @@ ServerApp::QuitRequested()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ServerApp::ArgvReceived(int32 argc, char **argv)
|
void
|
||||||
|
ServerApp::ArgvReceived(int32 argc, char **argv)
|
||||||
{
|
{
|
||||||
for (int arg = 1; arg < argc; arg++) {
|
for (int arg = 1; arg < argc; arg++) {
|
||||||
if (strstr(argv[arg], "dump")) {
|
if (strstr(argv[arg], "dump")) {
|
||||||
|
@ -208,7 +213,8 @@ void ServerApp::ArgvReceived(int32 argc, char **argv)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ServerApp::StartAddonServer()
|
void
|
||||||
|
ServerApp::StartAddonServer()
|
||||||
{
|
{
|
||||||
status_t err;
|
status_t err;
|
||||||
|
|
||||||
|
@ -245,7 +251,8 @@ void ServerApp::StartAddonServer()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ServerApp::TerminateAddonServer()
|
void
|
||||||
|
ServerApp::TerminateAddonServer()
|
||||||
{
|
{
|
||||||
// nothing to do if it's already terminated
|
// nothing to do if it's already terminated
|
||||||
if (!be_roster->IsRunning(B_MEDIA_ADDON_SERVER_SIGNATURE))
|
if (!be_roster->IsRunning(B_MEDIA_ADDON_SERVER_SIGNATURE))
|
||||||
|
@ -259,9 +266,9 @@ void ServerApp::TerminateAddonServer()
|
||||||
BMessage msg(B_QUIT_REQUESTED);
|
BMessage msg(B_QUIT_REQUESTED);
|
||||||
status_t err = msger.SendMessage(&msg, (BHandler *)NULL, 2000000);
|
status_t err = msger.SendMessage(&msg, (BHandler *)NULL, 2000000);
|
||||||
// 2 sec timeout
|
// 2 sec timeout
|
||||||
if (err) {
|
if (err != B_OK) {
|
||||||
ERROR("Trouble terminating media_addon_server (2). Error %d "
|
ERROR("Trouble terminating media_addon_server (2): %s\n",
|
||||||
"(%s)\n", err, strerror(err));
|
strerror(err));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -886,6 +893,7 @@ ServerApp::HandleMessage(int32 code, void *data, size_t size)
|
||||||
TRACE("ServerApp::HandleMessage %#lx leave\n", code);
|
TRACE("ServerApp::HandleMessage %#lx leave\n", code);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int32
|
int32
|
||||||
ServerApp::controlthread(void *arg)
|
ServerApp::controlthread(void *arg)
|
||||||
{
|
{
|
||||||
|
@ -903,6 +911,7 @@ ServerApp::controlthread(void *arg)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
ServerApp::MessageReceived(BMessage *msg)
|
ServerApp::MessageReceived(BMessage *msg)
|
||||||
{
|
{
|
||||||
|
@ -938,6 +947,10 @@ ServerApp::MessageReceived(BMessage *msg)
|
||||||
TRACE("ServerApp::MessageReceived %lx leave\n", msg->what);
|
TRACE("ServerApp::MessageReceived %lx leave\n", msg->what);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// #pragma mark -
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
main()
|
main()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue