Fixed a nasty bug I introduced when I fixed IMAP that made it impossible to send mail. Apparently I don't send that much.... it's been in there for a good week or so.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9663 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
a2c00cded5
commit
fcdc48f1a7
@ -49,7 +49,7 @@ class BMailChainRunner : public BLooper {
|
||||
// a filter returns MD_ALL_PASSES_DONE and before everything
|
||||
// is unloaded and sent home.
|
||||
|
||||
void Stop();
|
||||
void Stop(bool immediately = false);
|
||||
void ReportProgress(int bytes, int messages, const char *message = NULL);
|
||||
void ResetProgress(const char *message = NULL);
|
||||
|
||||
|
@ -11,4 +11,4 @@ LinkSharedOSLibs R5\ Daemon\ Filter :
|
||||
|
||||
Package haiku-maildaemon-cvs :
|
||||
R5\ Daemon\ Filter :
|
||||
boot home config add-ons mail_daemon inbound_filters ;
|
||||
boot beos system add-ons mail_daemon inbound_filters ;
|
||||
|
@ -163,7 +163,7 @@ IMAP4Client::IMAP4Client(BMessage *settings, BMailChainRunner *run) : BRemoteMai
|
||||
closesocket(net);
|
||||
#endif
|
||||
net = -1;
|
||||
runner->Stop();
|
||||
runner->Stop(true);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -200,7 +200,7 @@ IMAP4Client::IMAP4Client(BMessage *settings, BMailChainRunner *run) : BRemoteMai
|
||||
error << ":" << port;
|
||||
error << '.';
|
||||
runner->ShowError(error.String());
|
||||
runner->Stop();
|
||||
runner->Stop(true);
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
@ -211,7 +211,7 @@ IMAP4Client::IMAP4Client(BMessage *settings, BMailChainRunner *run) : BRemoteMai
|
||||
error << ". (" << strerror(errno) << ')';
|
||||
runner->ShowError(error.String());
|
||||
net = -1;
|
||||
runner->Stop();
|
||||
runner->Stop(true);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -242,7 +242,7 @@ IMAP4Client::IMAP4Client(BMessage *settings, BMailChainRunner *run) : BRemoteMai
|
||||
#else
|
||||
closesocket(net);
|
||||
#endif
|
||||
runner->Stop();
|
||||
runner->Stop(true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -272,7 +272,7 @@ IMAP4Client::IMAP4Client(BMessage *settings, BMailChainRunner *run) : BRemoteMai
|
||||
response << ')';
|
||||
runner->ShowError(response.String());
|
||||
err = B_ERROR;
|
||||
runner->Stop();
|
||||
runner->Stop(true);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -986,7 +986,7 @@ IMAP4Client::ReceiveLine(BString &out)
|
||||
closesocket(net);
|
||||
#endif
|
||||
net = -1;
|
||||
runner->Stop();
|
||||
runner->Stop(true);
|
||||
runner->ShowError(error.String());
|
||||
return -1;
|
||||
}
|
||||
@ -996,7 +996,7 @@ IMAP4Client::ReceiveLine(BString &out)
|
||||
}
|
||||
}else{
|
||||
// Log an error somewhere instead
|
||||
runner->Stop();
|
||||
runner->Stop(true);
|
||||
runner->ShowError("IMAP Timeout.");
|
||||
return B_TIMED_OUT;
|
||||
}
|
||||
@ -1070,7 +1070,7 @@ int IMAP4Client::GetResponse(BString &tag, NestedString *parsed_response, bool r
|
||||
closesocket(net);
|
||||
#endif
|
||||
net = -1;
|
||||
runner->Stop();
|
||||
runner->Stop(true);
|
||||
runner->ShowError(error.String());
|
||||
return -1;
|
||||
}
|
||||
@ -1173,7 +1173,7 @@ int IMAP4Client::GetResponse(BString &tag, NestedString *parsed_response, bool r
|
||||
}
|
||||
}else{
|
||||
// Log an error somewhere instead
|
||||
runner->Stop();
|
||||
runner->Stop(true);
|
||||
runner->ShowError("IMAP Timeout.");
|
||||
return B_TIMED_OUT;
|
||||
}
|
||||
|
@ -160,7 +160,7 @@ POP3Protocol::Open(const char *server, int port, int)
|
||||
#else
|
||||
closesocket(net);
|
||||
#endif
|
||||
runner->Stop();
|
||||
runner->Stop(true);
|
||||
return B_ERROR;
|
||||
|
||||
}
|
||||
@ -391,7 +391,7 @@ status_t POP3Protocol::RetrieveInternal(const char *command, int32 message,
|
||||
if (result == 0) {
|
||||
// No data available, even after waiting a minute.
|
||||
fLog = "POP3 timeout - no data received after a long wait.";
|
||||
runner->Stop();
|
||||
runner->Stop(true);
|
||||
return B_ERROR;
|
||||
}
|
||||
if (amountToReceive > bufSize - 1 - amountInBuffer)
|
||||
@ -597,7 +597,7 @@ POP3Protocol::ReceiveLine(BString &line)
|
||||
}
|
||||
} else {
|
||||
fLog = "POP3 socket timeout.";
|
||||
runner->Stop();
|
||||
runner->Stop(true);
|
||||
}
|
||||
return len;
|
||||
}
|
||||
|
@ -538,15 +538,19 @@ BMailChainRunner::get_messages(BStringList *list)
|
||||
|
||||
|
||||
void
|
||||
BMailChainRunner::Stop()
|
||||
BMailChainRunner::Stop(bool kill)
|
||||
{
|
||||
BMessageQueue *looper_queue = MessageQueue();
|
||||
looper_queue->Lock();
|
||||
BMessage *msg;
|
||||
while (msg = looper_queue->NextMessage()) delete msg; //-- Ensure STOP makes the front of the queue
|
||||
|
||||
PostMessage(B_QUIT_REQUESTED);
|
||||
looper_queue->Unlock();
|
||||
if (kill) {
|
||||
BMessageQueue *looper_queue = MessageQueue();
|
||||
looper_queue->Lock();
|
||||
BMessage *msg;
|
||||
while (msg = looper_queue->NextMessage()) delete msg; //-- Ensure STOP makes the front of the queue
|
||||
|
||||
PostMessage(B_QUIT_REQUESTED);
|
||||
looper_queue->Unlock();
|
||||
} else {
|
||||
PostMessage(B_QUIT_REQUESTED);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -8,6 +8,12 @@ if $(CHECK_MALLOC) {
|
||||
SubDirC++Flags -D_NO_INLINE_ASM -fcheck-memory-usage ;
|
||||
}
|
||||
|
||||
if $(TARGET_PLATFORM) = r5 {
|
||||
SubDirC++Flags -DBUILDING_R5_LIBNET ;
|
||||
} else {
|
||||
SubDirC++Flags -DBONE ;
|
||||
}
|
||||
|
||||
SubDirC++Flags -D_BUILDING_mail=1 -DUSE_NASTY_SYNC_THREAD_HACK=1 ;
|
||||
|
||||
SharedLibrary mail :
|
||||
@ -45,6 +51,23 @@ LinkSharedOSLibs libmail.so :
|
||||
stdc++.r4
|
||||
;
|
||||
|
||||
if $(TARGET_PLATFORM) = r5 {
|
||||
LinkSharedOSLibs libmail.so :
|
||||
be
|
||||
textencoding
|
||||
tracker
|
||||
stdc++.r4
|
||||
;
|
||||
} else {
|
||||
LinkSharedOSLibs libmail.so :
|
||||
be
|
||||
textencoding
|
||||
tracker
|
||||
stdc++.r4
|
||||
socket
|
||||
;
|
||||
}
|
||||
|
||||
MakeLocate <develop>libmail.so : $(OBOS_STLIB_DIR) ;
|
||||
RelSymLink <develop>libmail.so : libmail.so ;
|
||||
|
||||
|
@ -25,12 +25,15 @@
|
||||
#include <parsedate.h>
|
||||
|
||||
#ifdef BONE
|
||||
#ifdef _KERNEL_MODE
|
||||
#undef _KERNEL_MODE
|
||||
#include <sys/socket.h>
|
||||
#define _KERNEL_MODE 1
|
||||
#endif
|
||||
#include <bone_serial_ppp.h>
|
||||
#include <sys/socket.h>
|
||||
#define BONE_SERIAL_PPP_GET_STATUS 0xbe230501
|
||||
#define BSPPP_CONNECTED 4
|
||||
typedef struct {
|
||||
char if_name[32];
|
||||
int connection_status;
|
||||
status_t last_error;
|
||||
int connect_speed;
|
||||
} bsppp_status_t;
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user