Re submitting plugin support for Host Services
diff --git a/ipmid.C b/ipmid.C
index 6071cb3..0126779 100644
--- a/ipmid.C
+++ b/ipmid.C
@@ -13,9 +13,8 @@
#include <errno.h>
#include "sensorhandler.h"
-
-
sd_bus *bus = NULL;
+sd_bus_slot *ipmid_slot = NULL;
FILE *ipmiio, *ipmidbus, *ipmicmddetails;
@@ -373,9 +372,12 @@
return bus;
}
+sd_bus_slot *ipmid_get_sd_bus_slot(void) {
+ return ipmid_slot;
+}
+
int main(int argc, char *argv[])
{
- sd_bus_slot *slot = NULL;
int r;
unsigned long tvalue;
int c;
@@ -418,11 +420,8 @@
// Register all the handlers that provider implementation to IPMI commands.
ipmi_register_callback_handlers(HOST_IPMI_LIB_PATH);
- // Start the Host Services Dbus Objects
- start_host_service(bus, slot);
-
// Watch for BT messages
- r = sd_bus_add_match(bus, &slot, FILTER, handle_ipmi_command, NULL);
+ r = sd_bus_add_match(bus, &ipmid_slot, FILTER, handle_ipmi_command, NULL);
if (r < 0) {
fprintf(stderr, "Failed: sd_bus_add_match: %s : %s\n", strerror(-r), FILTER);
goto finish;
@@ -448,7 +447,7 @@
}
finish:
- sd_bus_slot_unref(slot);
+ sd_bus_slot_unref(ipmid_slot);
sd_bus_unref(bus);
return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS;