Add table walk when accessing all settings for a resource.
authorcantor <cantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Mon, 23 Aug 2010 19:09:44 +0000 (19:09 +0000)
committercantor <cantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Mon, 23 Aug 2010 19:09:44 +0000 (19:09 +0000)
git-svn-id: https://svn.middleware.georgetown.edu/cpp-sp/branches/REL_2@3305 cb58f699-b61c-0410-a6fe-9272a202ed29

apache/mod_apache.cpp
apache/mod_shib_20.cpp
apache/mod_shib_22.cpp

index 3f776b1..e8b1765 100644 (file)
@@ -859,6 +859,12 @@ pair<bool,int> ApacheRequestMapper::getInt(const char* name, const char* ns) con
     return s ? s->getInt(name,ns) : pair<bool,int>(false,0);
 }
 
+static int _rm_get_all_table_walk(void *v, const char *key, const char *value)
+{
+    reinterpret_cast<map<string,const char*>*>(v)->insert(pair<string,const char*>(key, value));
+    return 1;
+}
+
 void ApacheRequestMapper::getAll(map<string,const char*>& properties) const
 {
     const ShibTargetApache* sta=reinterpret_cast<const ShibTargetApache*>(m_staKey->getData());
@@ -887,6 +893,9 @@ void ApacheRequestMapper::getAll(map<string,const char*>& properties) const
         properties["requireSession"] = (sta->m_dc->bRequireSession==1) ? "true" : "false";
     if (sta->m_dc->bExportAssertion != 0)
         properties["exportAssertion"] = (sta->m_dc->bExportAssertion==1) ? "true" : "false";
+
+    if (sta->m_dc->tSettings)
+        ap_table_do(_rm_get_all_table_walk, &properties, sta->m_dc->tSettings, nullptr);
 }
 
 const PropertySet* ApacheRequestMapper::getPropertySet(const char* name, const char* ns) const
index c4260c1..47e8999 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  Copyright 2001-2009 Internet2
+ *  Copyright 2001-2010 Internet2
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -45,6 +45,7 @@
 #define ap_table_setn apr_table_setn
 #define ap_table_unset apr_table_unset
 #define ap_table_set apr_table_set
+#define ap_table_do apr_table_do
 #define ap_clear_pool apr_pool_clear
 #define ap_destroy_pool apr_pool_destroy
 #define ap_make_table apr_table_make
index fbaf17d..478351a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  Copyright 2001-2009 Internet2
+ *  Copyright 2001-2010 Internet2
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -45,6 +45,7 @@
 #define ap_table_setn apr_table_setn
 #define ap_table_unset apr_table_unset
 #define ap_table_set apr_table_set
+#define ap_table_do apr_table_do
 #define ap_copy_table apr_table_copy
 #define ap_overlay_tables apr_table_overlay
 #define ap_overlap_tables apr_table_overlap