[cpp-sp] branch master updated: Linux back port. fstream takes a char*, not a std::string

Rod Widdowson rdw at steadingsoftware.com
Tue Jan 9 11:59:30 EST 2018


This is an automated email from the git hooks/post-receive script.

rdw pushed a commit to branch master
in repository cpp-sp.

View the commit online:
http://git.shibboleth.net/view/?p=cpp-sp.git;a=commit;h=ccd13f278713cfe64ed9e2f0b790bd24c66c1377

The following commit(s) were added to refs/heads/master by this push:
       new  ccd13f2   Linux back port. fstream takes a char*, not a std::string
ccd13f2 is described below

commit ccd13f278713cfe64ed9e2f0b790bd24c66c1377
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Tue Jan 9 16:59:22 2018 +0000

    Linux back port. fstream takes a char*, not a std::string
---
 shibsp/metadata/DynamicMetadataProvider.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/shibsp/metadata/DynamicMetadataProvider.cpp b/shibsp/metadata/DynamicMetadataProvider.cpp
index fee1bb8..a3bcd16 100644
--- a/shibsp/metadata/DynamicMetadataProvider.cpp
+++ b/shibsp/metadata/DynamicMetadataProvider.cpp
@@ -62,6 +62,7 @@
 #  include <dirent.h>
 #  include <sys/types.h>
 #  include <sys/stat.h>
+#  include <errno.h>
 # else
 #  error Unsupported directory library headers.
 # endif
@@ -426,7 +427,7 @@ void DynamicMetadataProvider::indexEntity(EntityDescriptor* site, time_t& validU
             return;
     }
 
-    ofstream out(backingFile);
+    ofstream out(backingFile.c_str());
 
     XMLHelper::serialize(site->marshall(), out, false);
 }
@@ -486,7 +487,7 @@ void *DynamicMetadataProvider::init_fn(void* pv)
 #endif
         try {
             me->m_log.info("Reload from %s", fullname.c_str());
-            ifstream thisFileEntry(fullname);
+            ifstream thisFileEntry(fullname.c_str());
             if (thisFileEntry) {
                 auto_ptr<EntityDescriptor> entity (me->entityFromStream(thisFileEntry));
                 thisFileEntry.close();

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list