]> git.stg.codes - stg.git/commitdiff
Merge branch 'master' into full-month-stats
authorMaxim Mamontov <faust.madf@gmail.com>
Wed, 29 Feb 2012 13:20:51 +0000 (15:20 +0200)
committerMaxim Mamontov <faust.madf@gmail.com>
Wed, 29 Feb 2012 13:20:51 +0000 (15:20 +0200)
projects/rscriptd/rscriptd.conf
projects/stargazer/plugins/other/smux/smux.cpp
projects/stargazer/plugins/other/smux/smux.h
projects/stargazer/plugins/store/firebird/Makefile
projects/stargazer/settings_impl.cpp
projects/stargazer/user_impl.cpp

index 96f5d4654f021728876cfd098cdfb03ed143ae47..d668d46a94b9920dd333837599698b1348596cbf 100644 (file)
@@ -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
index f1c94d11b2bc18023bc9b05c9ef264597dffc2ef..551a28f1f09369d4c1b2cfc8e56cc078bf9701f6 100644 (file)
@@ -473,4 +473,5 @@ while (it != notifiers.end())
     it->GetUserPtr()->GetProperty().tariffName.DelAfterNotifier(&(*it));
     ++it;
     }
+notifiers.clear();
 }
index 24f7de32a384d9ede2cbc142e5303ef288e99d63..adeb50af0e7cdb256d5c883303cda2ae42cc32ec 100644 (file)
@@ -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);
index b4cce929949d7e5b0a78af6fcef9690984f58158..be9b4373dbab02472b64479f0555f3ede9e4582c 100644 (file)
@@ -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
 
index 2bf8d08271bf2b32bf718398d7c964d09744153e..16a2ac47130f1497fdb47ec1ee33e923989c5e42 100644 (file)
@@ -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;
index 733e625692bed34418c0a2dcdbccf0362fbc5571..3639060a85cc0c4ca25619af18e017e4fbf40840 100644 (file)
@@ -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;
     }
 }
 //-----------------------------------------------------------------------------