ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/Smersh/Smersh.cpp
(Generate patch)

Comparing Smersh/Smersh.cpp (file contents):
Revision 242 by Douglas Thrift, 2004-09-11T21:06:02-07:00 vs.
Revision 260 by Douglas Thrift, 2004-10-04T12:41:21-07:00

# Line 20 | Line 20 | struct SmershCommand : public app::Appli
20   {
21          virtual int Run(const app::ArgumentList& args)
22          {
23 <                program = api::GetExecutableName();
23 >                program = api::GetExecutablePath().GetName();
24  
25                  int port(54321);
26 <                bool fork(false), daemon(false), redirector(false);
26 >                bool daemon(false), redirector(false);
27                  string redirect, log("smersh.log");
28  
29 <                for (size_t index(0); index < args.GetSize(); ++index)
29 >                for (unsigned index(0); index < args.GetSize(); ++index)
30                  {
31                          string arg(args[index]);
32                          Matcher matcher;
# Line 45 | Line 45 | struct SmershCommand : public app::Appli
45                          {
46                                  port = lexical_cast<int>(matcher[1]);
47                          }
48                        else if (arg == "-fork")
49                        {
50                                if (!fork) fork = true;
51                        }
48                          else if (arg == matcher("^-log=(.+)$"))
49                          {
50                                  log = matcher[1];
# Line 60 | Line 56 | struct SmershCommand : public app::Appli
56                          else
57                          {
58                                  cout << "Usage: " << program
59 <                                        << " [-daemon|-redirector=redirect] [-port=port] [-fork] "
60 <                                        << "[-log=log] [-D]\n";
59 >                                        << " [-daemon|-redirector=redirect] [-port=port] [-log=log]"
60 >                                        << " [-D]\n";
61  
62                                  return 1;
63                          }
# Line 69 | Line 65 | struct SmershCommand : public app::Appli
65  
66                  if (daemon)
67                  {
68 <                        Daemon daemon(port, fork, log);
68 >                        Daemon daemon(port, log);
69                  }
70                  else if (redirector)
71                  {
72 <                        Redirector redirector(port, fork, log, redirect);
72 >                        Redirector redirector(port, log, redirect);
73                  }
74                  else
75                  {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines