]> git.stg.codes - stg.git/blobdiff - projects/stargazer/plugins/other/smux/handlers.cpp
Complete replacement notifiers with subscriptions.
[stg.git] / projects / stargazer / plugins / other / smux / handlers.cpp
index 01878da620a052d877e5dc1669efccf3e31944ee..cce188c8ca46ca33c30fa2bec369cb80ac26ace4 100644 (file)
@@ -10,6 +10,8 @@
 #include "utils.h"
 #include "smux.h"
 
+using STG::SMUX;
+
 #ifdef SMUX_DEBUG
 bool SMUX::CloseHandler(const SMUX_PDUs_t * pdus)
 {
@@ -44,15 +46,14 @@ bool SMUX::PDUsRequestHandler(const SMUX_PDUs_t * pdus)
 printfd(__FILE__, "SMUX::PDUsRequestHandler()\n");
 asn_fprint(stderr, &asn_DEF_SMUX_PDUs, pdus);
 #endif
-PDUsHandlers::iterator it;
-it = pdusHandlers.find(pdus->choice.pdus.present);
+PDUsHandlers::iterator it(pdusHandlers.find(pdus->choice.pdus.present));
 if (it != pdusHandlers.end())
     {
     return (this->*(it->second))(&pdus->choice.pdus);
     }
+#ifdef SMUX_DEBUG
 else
     {
-#ifdef SMUX_DEBUG
     switch (pdus->present)
         {
         case PDUs_PR_NOTHING:
@@ -67,8 +68,8 @@ else
         default:
             printfd(__FILE__, "SMUX::PDUsRequestHandler() - undefined\n");
         }
-#endif
     }
+#endif
 return true;
 }