add support for protocol "exchange"

IOS-2913
Roker 3 years ago
parent b652c2fabd
commit 0c6b2b257c

@ -54,6 +54,7 @@ typedef enum _AS_ACCESS
AS_PROTO_POP3 = 0x00011, ///< incoming
AS_PROTO_IMAP = 0x00012, ///< incoming
AS_PROTO_SMTP = 0x00021, ///< outgoing
AS_PROTO_EXCHANGE = 0x00041, ///< both (?)
AS_PROTO_BITMASK = 0x000FF, ///< bitmask for AS_PROTO...
/// socket types

@ -140,6 +140,7 @@ const std::map<std::string, unsigned> mproto =
{"pop3", AS_PROTO_POP3},
{"imap", AS_PROTO_IMAP},
{"smtp", AS_PROTO_SMTP},
{"exchange", AS_PROTO_EXCHANGE},
};
const std::map<std::string, unsigned> msocket =
@ -207,7 +208,13 @@ std::vector<ServerS> assignServers(const tx::XMLElement* elem, const char* membe
ServerS server;
unsigned access = 0;
const std::string type = e->Attribute("type");
access |= mproto.at(type);
try{
access |= mproto.at(type);
}catch(std::exception& e)
{
std::cerr << "*** UNKNOWN PROTOCOL TYPE \"" << type << "\" in memberName \"" << memberName << "\"! \n";
throw;
}
server.name = assignMember(e, "hostname");
server.port = std::stoi(assignMember(e, "port"));
@ -354,8 +361,11 @@ try{
"// Data size: " << string_pool_size << " + " << ass_size << " + " << isp_size << " = " << (string_pool_size+ass_size+isp_size) << " Bytes.\n"
"// ===<End of generated file>===\n\n";
}
/*
catch(std::runtime_error& e)
{
std::cerr << "ERROR: " << e.what() << "\n";
return 7;
}
*/
catch(double * d) {throw;}

Loading…
Cancel
Save