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

Diff of /smsdaemon/Sms.cpp

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

revision 26 by torben, Mon Jun 9 18:15:53 2008 UTC revision 39 by torben, Tue Jun 10 20:28:42 2008 UTC
# Line 29  std::string GetSmsData(SMS& sms) Line 29  std::string GetSmsData(SMS& sms)
29                                    
30                  std::string data =  sms.message.substr(pos, sms.message.length()-pos );                  std::string data =  sms.message.substr(pos, sms.message.length()-pos );
31    
32                  while (data.at(0) == ' ')                  data = Util::str_trim(data);
                         data = data.substr(1, data.length() -1);  
33                  return data;                  return data;
34          }          }
35  }  }
# Line 65  SMS SMS::FromRawString(const std::string Line 64  SMS SMS::FromRawString(const std::string
64                  }                  }
65          }          }
66    
67          while(body.at(0) == ' ') //remove starting space from body          body = Util::str_trim(body);
                 body = body.substr( 1, body.length() -1);  
68    
69          SMS newsms;          SMS newsms;
70    
71          newsms.sms_index = fields[0];          newsms.sms_index = fields[0];
72    
73          newsms.sender = fields[2];          newsms.sender = fields[2];
74          Util::str_clean(&newsms.sender, "\"");          newsms.sender = Util::str_replace(newsms.sender, "\"");
75                    
76          newsms.timestamp = fields[4] + std::string(",") + fields[5];          newsms.timestamp = fields[4] + std::string(",") + fields[5];    
77          Util::str_clean(&newsms.timestamp, "\"");          newsms.timestamp = Util::str_replace(newsms.timestamp, "\"");
78    
79          newsms.message = body;          newsms.message = body;
80    

Legend:
Removed from v.26  
changed lines
  Added in v.39

  ViewVC Help
Powered by ViewVC 1.1.20