/[projects]/smsdaemon/Util.cpp
ViewVC logotype

Diff of /smsdaemon/Util.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 43 by torben, Wed Jun 11 06:46:14 2008 UTC revision 49 by torben, Wed Jun 11 10:21:47 2008 UTC
# Line 7  Line 7 
7  #include <iostream>  #include <iostream>
8  #include <fstream>  #include <fstream>
9  #include <iconv.h>  #include <iconv.h>
10    #include <stdexcept>
11  #include <time.h>  #include <time.h>
12    
13  #include "util.h"  #include "util.h"
# Line 177  namespace Util Line 177  namespace Util
177                  string document;                  string document;
178                                    
179                  ostringstream command;                  ostringstream command;
180                  command << "wget -O " << tempfile << " -o /dev/null \"" << url << "\"";                  command << "wget -O " << tempfile << " --tries=1 --timeout=15 -o /dev/null  \"" << url << "\"";
181                  system( command.str().c_str() );                  int res = system( command.str().c_str() );
182                    if (res)
183                            throw std::runtime_error("Command time out");
184    
185                  ifstream in( tempfile.c_str() );                  ifstream in( tempfile.c_str() );
186    

Legend:
Removed from v.43  
changed lines
  Added in v.49

  ViewVC Help
Powered by ViewVC 1.1.20