From: Mark Donnelly Date: Wed, 5 Nov 2014 17:43:34 +0000 (-0500) Subject: Correct the storage data types for the name cache X-Git-Url: http://www.project-moonshot.org/gitweb/?a=commitdiff_plain;h=1c080b837bb6393fca0ec181b7938ad95ee17959;hp=afcb4ae74fc55e93fdb3fcb0e6f48081b7e83eb4;p=gssweb.git Correct the storage data types for the name cache --- diff --git a/json_gssapi/src/cache/GSSNameCache.cpp b/json_gssapi/src/cache/GSSNameCache.cpp index f0a6b0f..9d8ff86 100644 --- a/json_gssapi/src/cache/GSSNameCache.cpp +++ b/json_gssapi/src/cache/GSSNameCache.cpp @@ -62,7 +62,7 @@ std::string GSSNameCache::store ( GSSName& data, std::string inKey ) // Store the key/value pair in the map // Store the key in the context for convenience // std::cout << "\n==> In GSSNameCache::store, about to store data in the names hash.\n"; - names[key] = data; + names[key] = &data; /* Cleanup */ /* Return */ @@ -118,7 +118,7 @@ GSSName& GSSNameCache::retrieve ( std::string key ) /* Cleanup */ /* Return */ - return names[key]; + return *(names[key]); } GSSNameCache* GSSNameCache::instance() diff --git a/json_gssapi/src/cache/GSSNameCache.h b/json_gssapi/src/cache/GSSNameCache.h index d469b8a..4753cdb 100644 --- a/json_gssapi/src/cache/GSSNameCache.h +++ b/json_gssapi/src/cache/GSSNameCache.h @@ -13,7 +13,7 @@ #include "datamodel/GSSName.h" -typedef std::map NameMap; +typedef std::map NameMap; class GSSNameCache {