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

Diff of /smsdaemon/Util.cpp

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

revision 141 by torben, Sun Dec 7 13:28:52 2008 UTC revision 158 by torben, Mon Dec 8 21:49:49 2008 UTC
# Line 13  Line 13 
13  #include <stdlib.h>  #include <stdlib.h>
14    
15  #include <cstring>  #include <cstring>
16  #include "util.h"  #include "Util.h"
17    
18  using namespace std;  using namespace std;
19    
# Line 403  namespace Util Line 403  namespace Util
403                  ifstream in(filename.c_str());                  ifstream in(filename.c_str());
404                  if (in)                  if (in)
405                  {                  {
406                          char buffer[2048];                          char buffer[4096];
407                          in.read(buffer, 2047);                          in.read(buffer, 4095);
408                          buffer[ in.gcount() ] = 0;                          buffer[ in.gcount() ] = 0;
409                          str = string(buffer);                          str = string(buffer);
410                          in.close();                          in.close();
411                  }                  }
412                  else                  else
413                  {                  {
414                          string message =  "Could no open ";                          string message =  "Could not open ";
415                          message +=  filename;                          message +=  filename;
416                          throw std::runtime_error(message);                          throw std::runtime_error(message);
417                  }                  }

Legend:
Removed from v.141  
changed lines
  Added in v.158

  ViewVC Help
Powered by ViewVC 1.1.20