Code is more portable (older compilers does not accept ofstream with std::string...
authorEduardo Ramos Testillano <eduardo.ramos.testillano@ericsson.com>
Mon, 6 Apr 2015 16:03:29 +0000 (18:03 +0200)
committerEduardo Ramos Testillano <eduardo.ramos.testillano@ericsson.com>
Mon, 6 Apr 2015 16:03:29 +0000 (18:03 +0200)
example/diameter/launcher/main.cpp
example/diameter/pcapDecoder/main.cpp

index 2916704..5a5db42 100644 (file)
@@ -1503,7 +1503,7 @@ throw(anna::RuntimeException) {
 
     if(lst.size() > 1) {
       std::string all_in_one = "./dictionary-all-in-one.xml";
-      std::ofstream out(all_in_one, std::ifstream::out);
+      std::ofstream out(all_in_one.c_str(), std::ifstream::out);
       std::string buffer = d->asXMLString();
       out.write(buffer.c_str(), buffer.size());
       out.close();
index 672c619..cfa6c5f 100644 (file)
@@ -439,7 +439,7 @@ int main(int argc, char **argv) {
     decodeDataBlock(db_aux, detectedApplicationId);
     // Open output file:
     outputFile += ".as.xml";
-    std::ofstream out(outputFile, std::ifstream::out);
+    std::ofstream out(outputFile.c_str(), std::ifstream::out);
     out << G_codecMsg.asXMLString();
     // Close output file:
     out.close();
@@ -475,7 +475,7 @@ int main(int argc, char **argv) {
   // Print payloads //////////////////////////////////////////////////////////////////////////////////////////////
   // Open output file:
   outputFile += ".report";
-  std::ofstream out(outputFile, std::ifstream::out);
+  std::ofstream out(outputFile.c_str(), std::ifstream::out);
 
   for(payloads_it it = G_payloads.begin(); it != G_payloads.end(); it++) {
     LOGDEBUG(