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
|
// a filter returns MD_ALL_PASSES_DONE and before everything
|
||||||
// is unloaded and sent home.
|
// is unloaded and sent home.
|
||||||
|
|
||||||
void Stop();
|
void Stop(bool immediately = false);
|
||||||
void ReportProgress(int bytes, int messages, const char *message = NULL);
|
void ReportProgress(int bytes, int messages, const char *message = NULL);
|
||||||
void ResetProgress(const char *message = NULL);
|
void ResetProgress(const char *message = NULL);
|
||||||
|
|
||||||
|
@ -11,4 +11,4 @@ LinkSharedOSLibs R5\ Daemon\ Filter :
|
|||||||
|
|
||||||
Package haiku-maildaemon-cvs :
|
Package haiku-maildaemon-cvs :
|
||||||
R5\ Daemon\ Filter :
|
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);
|
closesocket(net);
|
||||||
#endif
|
#endif
|
||||||
net = -1;
|
net = -1;
|
||||||
runner->Stop();
|
runner->Stop(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -200,7 +200,7 @@ IMAP4Client::IMAP4Client(BMessage *settings, BMailChainRunner *run) : BRemoteMai
|
|||||||
error << ":" << port;
|
error << ":" << port;
|
||||||
error << '.';
|
error << '.';
|
||||||
runner->ShowError(error.String());
|
runner->ShowError(error.String());
|
||||||
runner->Stop();
|
runner->Stop(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -211,7 +211,7 @@ IMAP4Client::IMAP4Client(BMessage *settings, BMailChainRunner *run) : BRemoteMai
|
|||||||
error << ". (" << strerror(errno) << ')';
|
error << ". (" << strerror(errno) << ')';
|
||||||
runner->ShowError(error.String());
|
runner->ShowError(error.String());
|
||||||
net = -1;
|
net = -1;
|
||||||
runner->Stop();
|
runner->Stop(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -242,7 +242,7 @@ IMAP4Client::IMAP4Client(BMessage *settings, BMailChainRunner *run) : BRemoteMai
|
|||||||
#else
|
#else
|
||||||
closesocket(net);
|
closesocket(net);
|
||||||
#endif
|
#endif
|
||||||
runner->Stop();
|
runner->Stop(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -272,7 +272,7 @@ IMAP4Client::IMAP4Client(BMessage *settings, BMailChainRunner *run) : BRemoteMai
|
|||||||
response << ')';
|
response << ')';
|
||||||
runner->ShowError(response.String());
|
runner->ShowError(response.String());
|
||||||
err = B_ERROR;
|
err = B_ERROR;
|
||||||
runner->Stop();
|
runner->Stop(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -986,7 +986,7 @@ IMAP4Client::ReceiveLine(BString &out)
|
|||||||
closesocket(net);
|
closesocket(net);
|
||||||
#endif
|
#endif
|
||||||
net = -1;
|
net = -1;
|
||||||
runner->Stop();
|
runner->Stop(true);
|
||||||
runner->ShowError(error.String());
|
runner->ShowError(error.String());
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -996,7 +996,7 @@ IMAP4Client::ReceiveLine(BString &out)
|
|||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
// Log an error somewhere instead
|
// Log an error somewhere instead
|
||||||
runner->Stop();
|
runner->Stop(true);
|
||||||
runner->ShowError("IMAP Timeout.");
|
runner->ShowError("IMAP Timeout.");
|
||||||
return B_TIMED_OUT;
|
return B_TIMED_OUT;
|
||||||
}
|
}
|
||||||
@ -1070,7 +1070,7 @@ int IMAP4Client::GetResponse(BString &tag, NestedString *parsed_response, bool r
|
|||||||
closesocket(net);
|
closesocket(net);
|
||||||
#endif
|
#endif
|
||||||
net = -1;
|
net = -1;
|
||||||
runner->Stop();
|
runner->Stop(true);
|
||||||
runner->ShowError(error.String());
|
runner->ShowError(error.String());
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -1173,7 +1173,7 @@ int IMAP4Client::GetResponse(BString &tag, NestedString *parsed_response, bool r
|
|||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
// Log an error somewhere instead
|
// Log an error somewhere instead
|
||||||
runner->Stop();
|
runner->Stop(true);
|
||||||
runner->ShowError("IMAP Timeout.");
|
runner->ShowError("IMAP Timeout.");
|
||||||
return B_TIMED_OUT;
|
return B_TIMED_OUT;
|
||||||
}
|
}
|
||||||
|
@ -160,7 +160,7 @@ POP3Protocol::Open(const char *server, int port, int)
|
|||||||
#else
|
#else
|
||||||
closesocket(net);
|
closesocket(net);
|
||||||
#endif
|
#endif
|
||||||
runner->Stop();
|
runner->Stop(true);
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -391,7 +391,7 @@ status_t POP3Protocol::RetrieveInternal(const char *command, int32 message,
|
|||||||
if (result == 0) {
|
if (result == 0) {
|
||||||
// No data available, even after waiting a minute.
|
// No data available, even after waiting a minute.
|
||||||
fLog = "POP3 timeout - no data received after a long wait.";
|
fLog = "POP3 timeout - no data received after a long wait.";
|
||||||
runner->Stop();
|
runner->Stop(true);
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
}
|
}
|
||||||
if (amountToReceive > bufSize - 1 - amountInBuffer)
|
if (amountToReceive > bufSize - 1 - amountInBuffer)
|
||||||
@ -597,7 +597,7 @@ POP3Protocol::ReceiveLine(BString &line)
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
fLog = "POP3 socket timeout.";
|
fLog = "POP3 socket timeout.";
|
||||||
runner->Stop();
|
runner->Stop(true);
|
||||||
}
|
}
|
||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
@ -538,8 +538,9 @@ BMailChainRunner::get_messages(BStringList *list)
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
BMailChainRunner::Stop()
|
BMailChainRunner::Stop(bool kill)
|
||||||
{
|
{
|
||||||
|
if (kill) {
|
||||||
BMessageQueue *looper_queue = MessageQueue();
|
BMessageQueue *looper_queue = MessageQueue();
|
||||||
looper_queue->Lock();
|
looper_queue->Lock();
|
||||||
BMessage *msg;
|
BMessage *msg;
|
||||||
@ -547,6 +548,9 @@ BMailChainRunner::Stop()
|
|||||||
|
|
||||||
PostMessage(B_QUIT_REQUESTED);
|
PostMessage(B_QUIT_REQUESTED);
|
||||||
looper_queue->Unlock();
|
looper_queue->Unlock();
|
||||||
|
} else {
|
||||||
|
PostMessage(B_QUIT_REQUESTED);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -8,6 +8,12 @@ if $(CHECK_MALLOC) {
|
|||||||
SubDirC++Flags -D_NO_INLINE_ASM -fcheck-memory-usage ;
|
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 ;
|
SubDirC++Flags -D_BUILDING_mail=1 -DUSE_NASTY_SYNC_THREAD_HACK=1 ;
|
||||||
|
|
||||||
SharedLibrary mail :
|
SharedLibrary mail :
|
||||||
@ -45,6 +51,23 @@ LinkSharedOSLibs libmail.so :
|
|||||||
stdc++.r4
|
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) ;
|
MakeLocate <develop>libmail.so : $(OBOS_STLIB_DIR) ;
|
||||||
RelSymLink <develop>libmail.so : libmail.so ;
|
RelSymLink <develop>libmail.so : libmail.so ;
|
||||||
|
|
||||||
|
@ -25,12 +25,15 @@
|
|||||||
#include <parsedate.h>
|
#include <parsedate.h>
|
||||||
|
|
||||||
#ifdef BONE
|
#ifdef BONE
|
||||||
#ifdef _KERNEL_MODE
|
|
||||||
#undef _KERNEL_MODE
|
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#define _KERNEL_MODE 1
|
#define BONE_SERIAL_PPP_GET_STATUS 0xbe230501
|
||||||
#endif
|
#define BSPPP_CONNECTED 4
|
||||||
#include <bone_serial_ppp.h>
|
typedef struct {
|
||||||
|
char if_name[32];
|
||||||
|
int connection_status;
|
||||||
|
status_t last_error;
|
||||||
|
int connect_speed;
|
||||||
|
} bsppp_status_t;
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user