Minor cleanup, no functional change.
This commit is contained in:
@@ -458,9 +458,8 @@ MailDaemonApp::GetNewMessages(BMessage* msg)
|
|||||||
int32 account = -1;
|
int32 account = -1;
|
||||||
if (msg->FindInt32("account", &account) == B_OK && account >= 0) {
|
if (msg->FindInt32("account", &account) == B_OK && account >= 0) {
|
||||||
InboundProtocolThread* protocol = _FindInboundProtocol(account);
|
InboundProtocolThread* protocol = _FindInboundProtocol(account);
|
||||||
if (!protocol)
|
if (protocol != NULL)
|
||||||
return;
|
protocol->SyncMessages();
|
||||||
protocol->SyncMessages();
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -468,9 +467,8 @@ MailDaemonApp::GetNewMessages(BMessage* msg)
|
|||||||
AccountMap::const_iterator it = fAccounts.begin();
|
AccountMap::const_iterator it = fAccounts.begin();
|
||||||
for (; it != fAccounts.end(); it++) {
|
for (; it != fAccounts.end(); it++) {
|
||||||
InboundProtocolThread* protocol = it->second.inboundThread;
|
InboundProtocolThread* protocol = it->second.inboundThread;
|
||||||
if (!protocol)
|
if (protocol != NULL)
|
||||||
continue;
|
protocol->SyncMessages();
|
||||||
protocol->SyncMessages();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -483,7 +481,6 @@ MailDaemonApp::SendPendingMessages(BMessage* msg)
|
|||||||
|
|
||||||
map<int32, send_mails_info> messages;
|
map<int32, send_mails_info> messages;
|
||||||
|
|
||||||
|
|
||||||
int32 account = -1;
|
int32 account = -1;
|
||||||
if (msg->FindInt32("account", &account) != B_OK)
|
if (msg->FindInt32("account", &account) != B_OK)
|
||||||
account = -1;
|
account = -1;
|
||||||
@@ -738,7 +735,6 @@ MailDaemonApp::_CreateInboundProtocol(BMailAccountSettings& settings,
|
|||||||
image_id& image)
|
image_id& image)
|
||||||
{
|
{
|
||||||
const entry_ref& entry = settings.InboundPath();
|
const entry_ref& entry = settings.InboundPath();
|
||||||
|
|
||||||
InboundProtocol* (*instantiate_protocol)(BMailAccountSettings*);
|
InboundProtocol* (*instantiate_protocol)(BMailAccountSettings*);
|
||||||
|
|
||||||
BPath path(&entry);
|
BPath path(&entry);
|
||||||
@@ -746,13 +742,12 @@ MailDaemonApp::_CreateInboundProtocol(BMailAccountSettings& settings,
|
|||||||
if (image < 0)
|
if (image < 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
if (get_image_symbol(image, "instantiate_inbound_protocol",
|
if (get_image_symbol(image, "instantiate_inbound_protocol",
|
||||||
B_SYMBOL_TYPE_TEXT, (void **)&instantiate_protocol) != B_OK) {
|
B_SYMBOL_TYPE_TEXT, (void**)&instantiate_protocol) != B_OK) {
|
||||||
unload_add_on(image);
|
unload_add_on(image);
|
||||||
image = -1;
|
image = -1;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
InboundProtocol* protocol = (*instantiate_protocol)(&settings);
|
return (*instantiate_protocol)(&settings);
|
||||||
return protocol;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -761,7 +756,6 @@ MailDaemonApp::_CreateOutboundProtocol(BMailAccountSettings& settings,
|
|||||||
image_id& image)
|
image_id& image)
|
||||||
{
|
{
|
||||||
const entry_ref& entry = settings.OutboundPath();
|
const entry_ref& entry = settings.OutboundPath();
|
||||||
|
|
||||||
OutboundProtocol* (*instantiate_protocol)(BMailAccountSettings*);
|
OutboundProtocol* (*instantiate_protocol)(BMailAccountSettings*);
|
||||||
|
|
||||||
BPath path(&entry);
|
BPath path(&entry);
|
||||||
@@ -769,13 +763,12 @@ MailDaemonApp::_CreateOutboundProtocol(BMailAccountSettings& settings,
|
|||||||
if (image < 0)
|
if (image < 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
if (get_image_symbol(image, "instantiate_outbound_protocol",
|
if (get_image_symbol(image, "instantiate_outbound_protocol",
|
||||||
B_SYMBOL_TYPE_TEXT, (void **)&instantiate_protocol) != B_OK) {
|
B_SYMBOL_TYPE_TEXT, (void**)&instantiate_protocol) != B_OK) {
|
||||||
unload_add_on(image);
|
unload_add_on(image);
|
||||||
image = -1;
|
image = -1;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
OutboundProtocol* protocol = (*instantiate_protocol)(&settings);
|
return (*instantiate_protocol)(&settings);
|
||||||
return protocol;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user