Fixed spam server launch problem
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10378 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -245,7 +245,7 @@ TMailApp::AboutRequested()
|
|||||||
(new BAlert("",
|
(new BAlert("",
|
||||||
"BeMail\nBy Robert Polic\n\n"
|
"BeMail\nBy Robert Polic\n\n"
|
||||||
"Enhanced by Axel Dörfler and the Dr. Zoidberg crew\n\n"
|
"Enhanced by Axel Dörfler and the Dr. Zoidberg crew\n\n"
|
||||||
"Mail.cpp $Revision: 1.4 $\n"
|
"Mail.cpp $Revision: 1.5 $\n"
|
||||||
"Compiled on " __DATE__ " at " __TIME__ ".",
|
"Compiled on " __DATE__ " at " __TIME__ ".",
|
||||||
"Close"))->Go();
|
"Close"))->Go();
|
||||||
}
|
}
|
||||||
@@ -3622,9 +3622,23 @@ TMailWindow::TrainMessageAs(const char *CommandWord)
|
|||||||
// Make sure the server is running.
|
// Make sure the server is running.
|
||||||
if (!be_roster->IsRunning (kSpamServerSignature)) {
|
if (!be_roster->IsRunning (kSpamServerSignature)) {
|
||||||
errorCode = be_roster->Launch (kSpamServerSignature);
|
errorCode = be_roster->Launch (kSpamServerSignature);
|
||||||
|
if (errorCode != B_OK) {
|
||||||
|
BPath path;
|
||||||
|
entry_ref ref;
|
||||||
|
directory_which places[] = {B_COMMON_BIN_DIRECTORY,B_BEOS_BIN_DIRECTORY};
|
||||||
|
for (int32 i = 0; i < 2; i++) {
|
||||||
|
find_directory(places[i],&path);
|
||||||
|
path.Append("spamfilter");
|
||||||
|
if (!BEntry(path.Path()).Exists())
|
||||||
|
continue;
|
||||||
|
get_ref_for_path(path.Path(),&ref);
|
||||||
|
if ((errorCode = be_roster->Launch (&ref)) == B_OK)
|
||||||
|
break;
|
||||||
|
}
|
||||||
if (errorCode != B_OK)
|
if (errorCode != B_OK)
|
||||||
goto ErrorExit;
|
goto ErrorExit;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Set up the messenger to the database server.
|
// Set up the messenger to the database server.
|
||||||
errorCode = B_SERVER_NOT_FOUND;
|
errorCode = B_SERVER_NOT_FOUND;
|
||||||
|
|||||||
Reference in New Issue
Block a user