handler: move static object to main

Move the static object from the handler to main and drop the default
parameter such that one can build against this nicely in another build
environment.

Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I33347172907473977c52d30994f97a1685985b69
diff --git a/main.cpp b/main.cpp
index 9020809..e45d878 100644
--- a/main.cpp
+++ b/main.cpp
@@ -26,11 +26,13 @@
 namespace ethstats
 {
 
+EthStats handler;
+
 static ipmi_ret_t ethStatCommand(ipmi_cmd_t cmd __attribute__((unused)),
                                  const uint8_t* reqBuf, uint8_t* replyCmdBuf,
                                  size_t* dataLen)
 {
-    return handleEthStatCommand(reqBuf, replyCmdBuf, dataLen);
+    return handleEthStatCommand(reqBuf, replyCmdBuf, dataLen, &handler);
 }
 
 } // namespace ethstats