diff options
-rw-r--r-- | src/oids.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/oids.cpp b/src/oids.cpp index 4c56ff558..6b96b3656 100644 --- a/src/oids.cpp +++ b/src/oids.cpp @@ -28,7 +28,10 @@ void add_oid(const OID& oid, const std::string& name) *************************************************/ std::string lookup(const OID& oid) { - return global_config().get("oid2str", oid.as_string()); + std::string name = global_config().get("oid2str", oid.as_string()); + if(name == "") + return oid.as_string(); + return name; } /************************************************* @@ -36,7 +39,10 @@ std::string lookup(const OID& oid) *************************************************/ OID lookup(const std::string& name) { - return OID(global_config().get("str2oid", name)); + std::string value = global_config().get("str2oid", name); + if(value == "") + return OID(name); + return OID(value); } /************************************************* |