projects
/
metaproxy-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed bug #645: Filter Frontend_net must set proper Origin value.
[metaproxy-moved-to-github.git]
/
src
/
metaproxy_prog.cpp
diff --git
a/src/metaproxy_prog.cpp
b/src/metaproxy_prog.cpp
index
01f206b
..
0bec077
100644
(file)
--- a/
src/metaproxy_prog.cpp
+++ b/
src/metaproxy_prog.cpp
@@
-1,7
+1,7
@@
-/* $Id: metaproxy_prog.cpp,v 1.2 2006-04-29 08:44:58 adam Exp $
+/* $Id: metaproxy_prog.cpp,v 1.6 2006-06-10 14:29:12 adam Exp $
Copyright (c) 2005-2006, Index Data.
Copyright (c) 2005-2006, Index Data.
-%LICENSE%
+ See the LICENSE file for details
*/
#include "config.hpp"
*/
#include "config.hpp"
@@
-26,6
+26,7
@@
int main(int argc, char **argv)
po::options_description desc("Allowed options");
desc.add_options()
("help,h", "produce help message")
po::options_description desc("Allowed options");
desc.add_options()
("help,h", "produce help message")
+ ("version,V", "show version")
("config", po::value< std::vector<std::string> >(), "xml config")
;
("config", po::value< std::vector<std::string> >(), "xml config")
;
@@
-35,13
+36,16
@@
int main(int argc, char **argv)
po::variables_map vm;
po::store(po::command_line_parser(argc, argv).
options(desc).positional(p).run(), vm);
po::variables_map vm;
po::store(po::command_line_parser(argc, argv).
options(desc).positional(p).run(), vm);
- po::notify(vm);
+ po::notify(vm);
if (vm.count("help")) {
std::cout << desc << "\n";
return 1;
}
if (vm.count("help")) {
std::cout << desc << "\n";
return 1;
}
-
+ if (vm.count("version")) {
+ std::cout << "Metaproxy " VERSION "\n";
+ return 0;
+ }
xmlDocPtr doc = 0;
if (vm.count("config"))
{
xmlDocPtr doc = 0;
if (vm.count("config"))
{
@@
-75,7
+79,7
@@
int main(int argc, char **argv)
pack.router(router).move();
}
catch (std::runtime_error &e) {
pack.router(router).move();
}
catch (std::runtime_error &e) {
- std::cout << "std::runtime error: " << e.what() << "\n";
+ std::cerr << "std::runtime error: " << e.what() << "\n";
std::exit(1);
}
xmlFreeDoc(doc);
std::exit(1);
}
xmlFreeDoc(doc);
@@
-90,7
+94,7
@@
int main(int argc, char **argv)
std::exit(1);
}
catch (std::runtime_error &e) {
std::exit(1);
}
catch (std::runtime_error &e) {
- std::cout << "std::runtime error: " << e.what() << "\n";
+ std::cerr << "std::runtime error: " << e.what() << "\n";
std::exit(1);
}
catch ( ... ) {
std::exit(1);
}
catch ( ... ) {