git.stg.codes
/
stg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4d5dff7
)
Cosmetic changes
author
Maxim Mamontov
<faust.madf@gmail.com>
Fri, 13 Jan 2012 18:05:15 +0000
(20:05 +0200)
committer
Maxim Mamontov
<faust.madf@gmail.com>
Fri, 13 Jan 2012 18:05:15 +0000
(20:05 +0200)
projects/stargazer/plugins/other/smux/handlers.cpp
patch
|
blob
|
history
projects/stargazer/plugins/other/smux/smux.cpp
patch
|
blob
|
history
projects/stargazer/plugins/other/smux/smux.h
patch
|
blob
|
history
projects/stargazer/plugins/other/smux/tables.cpp
patch
|
blob
|
history
diff --git
a/projects/stargazer/plugins/other/smux/handlers.cpp
b/projects/stargazer/plugins/other/smux/handlers.cpp
index 01878da620a052d877e5dc1669efccf3e31944ee..ac179da9cc28ba6b0ae040c3e4e2d4aa7fb8f8ee 100644
(file)
--- a/
projects/stargazer/plugins/other/smux/handlers.cpp
+++ b/
projects/stargazer/plugins/other/smux/handlers.cpp
@@
-44,15
+44,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
+66,8
@@
else
default:
printfd(__FILE__, "SMUX::PDUsRequestHandler() - undefined\n");
}
default:
printfd(__FILE__, "SMUX::PDUsRequestHandler() - undefined\n");
}
-#endif
}
}
+#endif
return true;
}
return true;
}
diff --git
a/projects/stargazer/plugins/other/smux/smux.cpp
b/projects/stargazer/plugins/other/smux/smux.cpp
index 7372948ac8108a5115c078416d8e3f38a337c2bc..f1c94d11b2bc18023bc9b05c9ef264597dffc2ef 100644
(file)
--- a/
projects/stargazer/plugins/other/smux/smux.cpp
+++ b/
projects/stargazer/plugins/other/smux/smux.cpp
@@
-337,15
+337,14
@@
return false;
bool SMUX::DispatchPDUs(const SMUX_PDUs_t * pdus)
{
bool SMUX::DispatchPDUs(const SMUX_PDUs_t * pdus)
{
-SMUXHandlers::iterator it;
-it = smuxHandlers.find(pdus->present);
+SMUXHandlers::iterator it(smuxHandlers.find(pdus->present));
if (it != smuxHandlers.end())
{
return (this->*(it->second))(pdus);
}
if (it != smuxHandlers.end())
{
return (this->*(it->second))(pdus);
}
+#ifdef SMUX_DEBUG
else
{
else
{
-#ifdef SMUX_DEBUG
switch (pdus->present)
{
case SMUX_PDUs_PR_NOTHING:
switch (pdus->present)
{
case SMUX_PDUs_PR_NOTHING:
@@
-361,8
+360,8
@@
else
printfd(__FILE__, "PDUs: undefined\n");
}
asn_fprint(stderr, &asn_DEF_SMUX_PDUs, pdus);
printfd(__FILE__, "PDUs: undefined\n");
}
asn_fprint(stderr, &asn_DEF_SMUX_PDUs, pdus);
-#endif
}
}
+#endif
return false;
}
return false;
}
@@
-468,15
+467,10
@@
tariffs->DelNotifierAdd(&addDelTariffNotifier);
users->DelNotifierUserDel(&delUserNotifier);
users->DelNotifierUserAdd(&addUserNotifier);
users->DelNotifierUserDel(&delUserNotifier);
users->DelNotifierUserAdd(&addUserNotifier);
-std::list<CHG_AFTER_NOTIFIER>::iterator it
= notifiers.begin(
);
+std::list<CHG_AFTER_NOTIFIER>::iterator it
(notifiers.begin()
);
while (it != notifiers.end())
{
it->GetUserPtr()->GetProperty().tariffName.DelAfterNotifier(&(*it));
++it;
}
}
while (it != notifiers.end())
{
it->GetUserPtr()->GetProperty().tariffName.DelAfterNotifier(&(*it));
++it;
}
}
-
-void CHG_AFTER_NOTIFIER::Notify(const std::string &, const std::string &)
-{
-smux.UpdateTables();
-}
diff --git
a/projects/stargazer/plugins/other/smux/smux.h
b/projects/stargazer/plugins/other/smux/smux.h
index a92326085253a66fd90d4a01e15f52c306cba801..9d0e516d064989e957dcd69c4730be78de5a743e 100644
(file)
--- a/
projects/stargazer/plugins/other/smux/smux.h
+++ b/
projects/stargazer/plugins/other/smux/smux.h
@@
-182,6
+182,12
@@
private:
};
//-----------------------------------------------------------------------------
};
//-----------------------------------------------------------------------------
+inline
+void CHG_AFTER_NOTIFIER::Notify(const std::string &, const std::string &)
+{
+smux.UpdateTables();
+}
+
inline
void ADD_DEL_TARIFF_NOTIFIER::Notify(const TARIFF_DATA &)
{
inline
void ADD_DEL_TARIFF_NOTIFIER::Notify(const TARIFF_DATA &)
{
diff --git
a/projects/stargazer/plugins/other/smux/tables.cpp
b/projects/stargazer/plugins/other/smux/tables.cpp
index ad08c40f02acd03794aefa2b996d1ea6729ab2cd..25b2dd85d8372b880bfa1be5e85f3b45ccafbede 100644
(file)
--- a/
projects/stargazer/plugins/other/smux/tables.cpp
+++ b/
projects/stargazer/plugins/other/smux/tables.cpp
@@
-31,8
+31,7
@@
while (!users.SearchNext(handle, &user))
if (user->GetDeleted())
continue;
std::string tariffName(user->GetProperty().tariffName.ConstData());
if (user->GetDeleted())
continue;
std::string tariffName(user->GetProperty().tariffName.ConstData());
- std::map<std::string, size_t>::iterator it;
- it = data.lower_bound(tariffName);
+ std::map<std::string, size_t>::iterator it(data.lower_bound(tariffName));
if (it == data.end() ||
it->first != tariffName)
{
if (it == data.end() ||
it->first != tariffName)
{