git.stg.codes
/
stg.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Stargazer (#6)
[stg.git]
/
projects
/
stargazer
/
plugins
/
other
/
smux
/
handlers.cpp
diff --git
a/projects/stargazer/plugins/other/smux/handlers.cpp
b/projects/stargazer/plugins/other/smux/handlers.cpp
index 01878da620a052d877e5dc1669efccf3e31944ee..a3e0613824ace9ecad38f8b6bfde9e9807266231 100644
(file)
--- a/
projects/stargazer/plugins/other/smux/handlers.cpp
+++ b/
projects/stargazer/plugins/other/smux/handlers.cpp
@@
-1,14
+1,19
@@
-#include <cassert>
+#include "smux.h"
+#include "utils.h"
+#include "stg/common.h"
+
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wold-style-cast"
#include "stg/GetRequest-PDU.h"
#include "stg/GetResponse-PDU.h"
#include "stg/VarBindList.h"
#include "stg/VarBind.h"
#include "stg/GetRequest-PDU.h"
#include "stg/GetResponse-PDU.h"
#include "stg/VarBindList.h"
#include "stg/VarBind.h"
+#pragma GCC diagnostic pop
-#include
"stg/common.h"
+#include
<cassert>
-#include "utils.h"
-#include "smux.h"
+using STG::SMUX;
#ifdef SMUX_DEBUG
bool SMUX::CloseHandler(const SMUX_PDUs_t * pdus)
#ifdef SMUX_DEBUG
bool SMUX::CloseHandler(const SMUX_PDUs_t * pdus)
@@
-44,15
+49,14
@@
bool SMUX::PDUsRequestHandler(const SMUX_PDUs_t * pdus)
printfd(__FILE__, "SMUX::PDUsRequestHandler()\n");
asn_fprint(stderr, &asn_DEF_SMUX_PDUs, pdus);
#endif
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);
}
if (it != pdusHandlers.end())
{
return (this->*(it->second))(&pdus->choice.pdus);
}
+#ifdef SMUX_DEBUG
else
{
else
{
-#ifdef SMUX_DEBUG
switch (pdus->present)
{
case PDUs_PR_NOTHING:
switch (pdus->present)
{
case PDUs_PR_NOTHING:
@@
-67,8
+71,8
@@
else
default:
printfd(__FILE__, "SMUX::PDUsRequestHandler() - undefined\n");
}
default:
printfd(__FILE__, "SMUX::PDUsRequestHandler() - undefined\n");
}
-#endif
}
}
+#endif
return true;
}
return true;
}