From: Maxim Mamontov Date: Wed, 29 Feb 2012 13:20:51 +0000 (+0200) Subject: Merge branch 'master' into full-month-stats X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/71d677c9c98e3d2dbdffba72b3b351365f328529?hp=e2e4e44c53dd035edad67fc7d6941dff48dccbd4 Merge branch 'master' into full-month-stats --- diff --git a/projects/rscriptd/rscriptd.conf b/projects/rscriptd/rscriptd.conf index 96f5d465..d668d46a 100644 --- a/projects/rscriptd/rscriptd.conf +++ b/projects/rscriptd/rscriptd.conf @@ -4,5 +4,5 @@ ConfigDir=/etc/rscriptd Password=123456 Port=9999 UserTimeout=60 -ScriptOnConnect=/etc/stargazer/OnConnect -ScriptOnDisconnect=/etc/stargazer/OnDisconnect +ScriptOnConnect=/etc/rscriptd/OnConnect +ScriptOnDisconnect=/etc/rscriptd/OnDisconnect diff --git a/projects/stargazer/plugins/other/smux/smux.cpp b/projects/stargazer/plugins/other/smux/smux.cpp index f1c94d11..551a28f1 100644 --- a/projects/stargazer/plugins/other/smux/smux.cpp +++ b/projects/stargazer/plugins/other/smux/smux.cpp @@ -473,4 +473,5 @@ while (it != notifiers.end()) it->GetUserPtr()->GetProperty().tariffName.DelAfterNotifier(&(*it)); ++it; } +notifiers.clear(); } diff --git a/projects/stargazer/plugins/other/smux/smux.h b/projects/stargazer/plugins/other/smux/smux.h index 24f7de32..adeb50af 100644 --- a/projects/stargazer/plugins/other/smux/smux.h +++ b/projects/stargazer/plugins/other/smux/smux.h @@ -65,7 +65,7 @@ public: smux(rvalue.smux), userPtr(rvalue.userPtr) {} void Notify(const std::string &, const std::string &); - USER_PTR GetUserPtr() { return userPtr; } + USER_PTR GetUserPtr() const { return userPtr; } private: CHG_AFTER_NOTIFIER & operator=(const CHG_AFTER_NOTIFIER & rvalue); diff --git a/projects/stargazer/plugins/store/firebird/Makefile b/projects/stargazer/plugins/store/firebird/Makefile index b4cce929..be9b4373 100644 --- a/projects/stargazer/plugins/store/firebird/Makefile +++ b/projects/stargazer/plugins/store/firebird/Makefile @@ -22,5 +22,11 @@ STGLIBS = ibpp \ locker \ crypto +FB_CFLAGS = $(shell fb_config --cflags) +FB_LDFLAGS = $(shell fb_config --libs) + +CXXFLAGS += $(FB_CFLAGS) +LDFLAGS += $(FB_LDFLAGS) + include ../../Makefile.in diff --git a/projects/stargazer/settings_impl.cpp b/projects/stargazer/settings_impl.cpp index 2bf8d082..16a2ac47 100644 --- a/projects/stargazer/settings_impl.cpp +++ b/projects/stargazer/settings_impl.cpp @@ -375,7 +375,7 @@ while (node) if (strcasecmp(node->getName(), "FeeChargeType") == 0) { - if (ParseUnsignedInRange(node->getValue(0), 0, 2, &feeChargeType) != 0) + if (ParseUnsignedInRange(node->getValue(0), 0, 3, &feeChargeType) != 0) { strError = "Incorrect FeeChargeType value: \'" + string(node->getValue(0)) + "\'"; return -1; diff --git a/projects/stargazer/user_impl.cpp b/projects/stargazer/user_impl.cpp index 733e6256..3639060a 100644 --- a/projects/stargazer/user_impl.cpp +++ b/projects/stargazer/user_impl.cpp @@ -1250,6 +1250,10 @@ switch (settings->GetFeeChargeType()) if (c + credit >= fee) property.cash.Set(c - fee, sysAdmin, login, store, "Subscriber fee charge"); break; + case 3: + if (c >= 0) + property.cash.Set(c - fee, sysAdmin, login, store, "Subscriber fee charge"); + break; } ResetPassiveTime(); } @@ -1312,6 +1316,13 @@ switch (settings->GetFeeChargeType()) SetPrepaidTraff(); } break; + case 3: + if (c >= 0) + { + property.cash.Set(c - fee, sysAdmin, login, store, "Subscriber fee charge"); + SetPrepaidTraff(); + } + break; } } //-----------------------------------------------------------------------------