- We do not have the AGMS Spam Server in our tree, so fixed signature and names to load the third-party server if

provided.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26985 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Bruno G. Albuquerque
2008-08-15 23:52:23 +00:00
parent f75add6173
commit 9e5d812407
@@ -126,7 +126,7 @@ static const char *kAGMSBayesBeepGenuineName = "SpamFilter-Genuine";
static const char *kAGMSBayesBeepSpamName = "SpamFilter-Spam";
static const char *kAGMSBayesBeepUncertainName = "SpamFilter-Uncertain";
static const char *kServerSignature = "application/x-vnd.agmsmith.spamdbm";
static const char *kServerSignature = "application/x-vnd.agmsmith.AGMSBayesianSpamServer";
AGMSBayesianSpamFilter::AGMSBayesianSpamFilter (BMessage *settings)
@@ -222,6 +222,7 @@ AGMSBayesianSpamFilter::ProcessMailMessage (
// inbetween messages. This code used to be in InitCheck, but apparently
// that isn't called.
printf("Checking for Spam Server.\n");
if (fLaunchAttemptCount == 0 || !fMessengerToServer.IsValid ()) {
if (fLaunchAttemptCount > 3)
goto ErrorExit; // Don't try to start the server too many times.
@@ -236,7 +237,7 @@ AGMSBayesianSpamFilter::ProcessMailMessage (
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("spamdbm");
path.Append("AGMSBayesianSpamServer");
if (!BEntry(path.Path()).Exists())
continue;
get_ref_for_path(path.Path(),&ref);