allow legacy handlers to register with groupoem extension

DCMI uses the group oem extension 0xdc. The legacy registration
allowed for registering with the group extension netfn and did nothing
with the actual group extension ID. This change makes the assumption
that all legacy group extension registrations are dcmi and registers
them as such with the new group handler machinery.

Tested-by: Run ipmitool dcmi discover and see it show information

Change-Id: I862ba212a7fe2e2dad83d6c9f22e7d1a48b7d406
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
diff --git a/ipmid-new.cpp b/ipmid-new.cpp
index 5741842..2668157 100644
--- a/ipmid-new.cpp
+++ b/ipmid-new.cpp
@@ -21,6 +21,7 @@
 
 #include <algorithm>
 #include <any>
+#include <dcmihandler.hpp>
 #include <exception>
 #include <filesystem>
 #include <forward_list>
@@ -482,7 +483,19 @@
             realPriv = ipmi::Privilege::Admin;
             break;
     }
-    ipmi::impl::registerHandler(ipmi::prioOpenBmcBase, netFn, cmd, realPriv, h);
+    // The original ipmi_register_callback allowed for group OEM handlers
+    // to be registered via this same interface. It just so happened that
+    // all the handlers were part of the DCMI group, so default to that.
+    if (netFn == NETFUN_GRPEXT)
+    {
+        ipmi::impl::registerGroupHandler(ipmi::prioOpenBmcBase,
+                                         dcmi::groupExtId, cmd, realPriv, h);
+    }
+    else
+    {
+        ipmi::impl::registerHandler(ipmi::prioOpenBmcBase, netFn, cmd, realPriv,
+                                    h);
+    }
 }
 
 namespace oem