diff options
author | Vincent Richard <[email protected]> | 2004-12-26 16:46:52 +0000 |
---|---|---|
committer | Vincent Richard <[email protected]> | 2004-12-26 16:46:52 +0000 |
commit | f5f15e5076b979e1c532bf03a12cda96c42bf0b1 (patch) | |
tree | f35b0ed8fd175d08101f0a0cb09cc9db26ebe75d /src/messaging/serviceFactory.cpp | |
parent | Fixed bug in URL parsing. (diff) | |
download | vmime-f5f15e5076b979e1c532bf03a12cda96c42bf0b1.tar.gz vmime-f5f15e5076b979e1c532bf03a12cda96c42bf0b1.zip |
Allow creating a service from an URL.
Diffstat (limited to 'src/messaging/serviceFactory.cpp')
-rw-r--r-- | src/messaging/serviceFactory.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/messaging/serviceFactory.cpp b/src/messaging/serviceFactory.cpp index 666e052d..9d51e79b 100644 --- a/src/messaging/serviceFactory.cpp +++ b/src/messaging/serviceFactory.cpp @@ -62,9 +62,10 @@ service* serviceFactory::create if (u.getPort() != url::UNSPECIFIED_PORT) sess->getProperties()[serv->getInfos().getPropertyPrefix() + "server.port"] = u.getPort(); - // Path portion of the URL is used to point a specific folder (empty = root) - //if (!u.path().empty()) - // sess->properties()[serv->getInfos().getPropertyPrefix() + "server.path"] = u.getPath(); + // Path portion of the URL is used to point a specific folder (empty = root). + // In maildir, this is used to point to the root of the message repository. + if (!u.getPath().empty()) + sess->getProperties()[serv->getInfos().getPropertyPrefix() + "server.rootpath"] = u.getPath(); if (!u.getUsername().empty()) { @@ -87,7 +88,7 @@ const serviceFactory::registeredService* serviceFactory::getServiceByProtocol(co return (*it); } - throw exceptions::no_service_available(); + throw exceptions::no_service_available(name); } |