From: Maxim Mamontov Date: Tue, 7 Feb 2012 11:42:09 +0000 (+0200) Subject: Merge branch 'master' into full-month-stats X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/a39afcce76c3a02331385af96a474207d057fb09?hp=2d8751468836d2c5d92dee3328f22ceefbc0c47b Merge branch 'master' into full-month-stats --- diff --git a/doc/help.odt b/doc/help.odt index cc9e9373..24c5382a 100644 Binary files a/doc/help.odt and b/doc/help.odt differ diff --git a/doc/help/ch4.xml b/doc/help/ch4.xml index aba9c84b..fe2c185e 100644 --- a/doc/help/ch4.xml +++ b/doc/help/ch4.xml @@ -228,7 +228,8 @@ passiveUsers (8) — параметр, описывающий количество «замороженных» абонентов; creditUsers (9) — параметр, описывающий количество абонентов с положительным кредитом; freeMbUsers (10) — параметр, описывающий количество абонентов с неизрасходованными «бесплатными мегабайтами»; - tariffChangeUsers (11) — параметр, описывающий количество абонентов у которых с началом месяца будет изменен тариф. + tariffChangeUsers (11) — параметр, описывающий количество абонентов у которых с началом месяца будет изменен тариф; + activeUsers (12) — параметр, описывающий количество абонентов у которых имеется посчитанный трафик за сессию. tariffs (2) — секция, содержащая параметры относящиеся к тарифам: @@ -276,6 +277,7 @@ | +-- -R-- Integer32 creditUsers(9) | +-- -R-- Integer32 freeMbUsers(10) | +-- -R-- Integer32 tariffChangeUsers(11) + | +-- -R-- Integer32 activeUsers(12) | +--tariffs(2) | | diff --git a/doc/xmlrpc/.gitignore b/doc/xmlrpc/.gitignore new file mode 100644 index 00000000..23798672 --- /dev/null +++ b/doc/xmlrpc/.gitignore @@ -0,0 +1 @@ +book/*html diff --git a/include/stg/user_ips.h b/include/stg/user_ips.h index 8fada63b..a29e2812 100644 --- a/include/stg/user_ips.h +++ b/include/stg/user_ips.h @@ -202,7 +202,6 @@ USER_IPS ips; char * paddr; IP_MASK im; std::vector ipMask; -std::string err; if (ipsStr.empty()) { return ips; @@ -236,7 +235,6 @@ for (unsigned int i = 0; i < ipMask.size(); i++) strIp = strtok(str, "/"); if (strIp == NULL) { - err = "Incorrect IP address " + ipsStr; return ips; } strMask = strtok(NULL, "/"); @@ -244,7 +242,6 @@ for (unsigned int i = 0; i < ipMask.size(); i++) im.ip = inet_addr(strIp); if (im.ip == INADDR_NONE) { - err = "Incorrect IP address: " + std::string(strIp); return ips; } @@ -254,20 +251,17 @@ for (unsigned int i = 0; i < ipMask.size(); i++) int m = 0; if (str2x(strMask, m) != 0) { - err = "Incorrect mask: " + std::string(strMask); return ips; } im.mask = m; if (im.mask > 32) { - err = "Incorrect mask: " + std::string(strMask); return ips; } if ((im.ip & ips.CalcMask(im.mask)) != im.ip) { - err = "Address does'n match mask: " + std::string(strIp) + "/" + std::string(strMask); return ips; } } diff --git a/include/stg/user_property.h b/include/stg/user_property.h index bdad48b0..fbd6aa46 100644 --- a/include/stg/user_property.h +++ b/include/stg/user_property.h @@ -286,8 +286,6 @@ bool USER_PROPERTY_LOGGED::Set(const varT & val, const std::string & msg) { const PRIV * priv = admin->GetPriv(); -std::string adm_login = admin->GetLogin(); -std::string adm_ip = admin->GetIPStr(); if ((priv->userConf && !isStat) || (priv->userStat && isStat) || diff --git a/include/stg/version.h b/include/stg/version.h index 293f67d3..9b94ca12 100644 --- a/include/stg/version.h +++ b/include/stg/version.h @@ -27,6 +27,6 @@ #define __VERSION_H__ // Stargazer version -#define SERVER_VERSION "2.408-rc2" +#define SERVER_VERSION "2.408" #endif diff --git a/projects/convertor/Makefile b/projects/convertor/Makefile index 4417e970..efacbb64 100644 --- a/projects/convertor/Makefile +++ b/projects/convertor/Makefile @@ -70,6 +70,13 @@ deps: $(SRCS) ../../Makefile.conf $(MAKE) -C $(DIR_LIBSRC) @>deps ;\ for file in $(SRCS); do\ - echo "`$(CC) $(CXXFLAGS) -MM $$file` Makefile" >> deps ;\ - printf '%b\n' '\t$$(CC) -c $$< $(CXXFLAGS)' >> deps ;\ + echo "$$file" | grep ".c$$" > /dev/null;\ + if [ $$? -eq 0 ];\ + then\ + echo "`$(CC) $(CFLAGS) -MM $$file` Makefile" >> deps ;\ + printf '%b\n' '\t$$(CC) $(CFLAGS) -c $$<' >> deps ;\ + else\ + echo "`$(CXX) $(CXXFLAGS) -MM $$file` Makefile" >> deps ;\ + printf '%b\n' '\t$$(CXX) $(CXXFLAGS) -c $$<' >> deps ;\ + fi;\ done diff --git a/projects/convertor/build b/projects/convertor/build index c1e2ce78..0144b0f1 100755 --- a/projects/convertor/build +++ b/projects/convertor/build @@ -36,6 +36,7 @@ then 6) OS=bsd5;; 7) OS=bsd7;; 8) OS=bsd7;; + 9) OS=bsd7;; *) OS=unknown;; esac MAKE="gmake" diff --git a/projects/rlm_stg/Makefile b/projects/rlm_stg/Makefile index da25f599..9d51021b 100644 --- a/projects/rlm_stg/Makefile +++ b/projects/rlm_stg/Makefile @@ -76,6 +76,13 @@ deps: $(SRCS) ../../Makefile.conf $(MAKE) -C $(DIR_LIBSRC) @>deps ;\ for file in $(SRCS); do\ - echo "`$(CC) $(CXXFLAGS) -MM $$file` Makefile" >> deps ;\ - printf '%b\n' '\t$$(CC) -c $$< $(CXXFLAGS)' >> deps ;\ + echo "$$file" | grep ".c$$" > /dev/null;\ + if [ $$? -eq 0 ];\ + then\ + echo "`$(CC) $(CFLAGS) -MM $$file` Makefile" >> deps ;\ + printf '%b\n' '\t$$(CC) $(CFLAGS) -c $$<' >> deps ;\ + else\ + echo "`$(CXX) $(CXXFLAGS) -MM $$file` Makefile" >> deps ;\ + printf '%b\n' '\t$$(CXX) $(CXXFLAGS) -c $$<' >> deps ;\ + fi;\ done diff --git a/projects/rlm_stg/build b/projects/rlm_stg/build index fa846085..0145d038 100755 --- a/projects/rlm_stg/build +++ b/projects/rlm_stg/build @@ -48,6 +48,7 @@ then 6) OS=bsd5;; 7) OS=bsd7;; 8) OS=bsd7;; + 9) OS=bsd7;; *) OS=unknown;; esac MAKE="gmake" diff --git a/projects/rscriptd/Makefile b/projects/rscriptd/Makefile index 581b3275..0912be08 100644 --- a/projects/rscriptd/Makefile +++ b/projects/rscriptd/Makefile @@ -62,8 +62,8 @@ install-bin: install-data: # Install etc - mkdir -m $(DIR_MODE) -p $(PREFIX)/etc/stargazer - install -m $(DATA_MODE) -o $(OWNER) ./rscriptd.conf $(PREFIX)/etc/stargazer/rscriptd.conf + mkdir -m $(DIR_MODE) -p $(PREFIX)/etc/rscriptd + install -m $(DATA_MODE) -o $(OWNER) ./rscriptd.conf $(PREFIX)/etc/rscriptd/rscriptd.conf uninstall: uninstall-bin uninstall-data @@ -72,7 +72,7 @@ uninstall-bin: uninstall-data: # Uninstall etc - rm -f $(PREFIX)/etc/stragazer/rscriptd.conf + rm -f $(PREFIX)/etc/rscriptd/rscriptd.conf ifneq ($(MAKECMDGOALS),distclean) @@ -87,6 +87,13 @@ deps: $(SRCS) ../../Makefile.conf $(MAKE) -C $(DIR_LIBSRC) @>deps ;\ for file in $(SRCS); do\ - echo "`$(CC) $(CXXFLAGS) -MM $$file` Makefile" >> deps ;\ - printf '%b\n' '\t$$(CC) -c $$< $(CXXFLAGS)' >> deps ;\ + echo "$$file" | grep ".c$$" > /dev/null;\ + if [ $$? -eq 0 ];\ + then\ + echo "`$(CC) $(CFLAGS) -MM $$file` Makefile" >> deps ;\ + printf '%b\n' '\t$$(CC) $(CFLAGS) -c $$<' >> deps ;\ + else\ + echo "`$(CXX) $(CXXFLAGS) -MM $$file` Makefile" >> deps ;\ + printf '%b\n' '\t$$(CXX) $(CXXFLAGS) -c $$<' >> deps ;\ + fi;\ done diff --git a/projects/rscriptd/build b/projects/rscriptd/build index 3aa8799b..885eef76 100755 --- a/projects/rscriptd/build +++ b/projects/rscriptd/build @@ -48,6 +48,7 @@ then 6) OS=bsd5;; 7) OS=bsd7;; 8) OS=bsd7;; + 9) OS=bsd7;; *) OS=unknown;; esac MAKE="gmake" diff --git a/projects/sgauth/.gitignore b/projects/sgauth/.gitignore new file mode 100644 index 00000000..f4bcc898 --- /dev/null +++ b/projects/sgauth/.gitignore @@ -0,0 +1,2 @@ +css.h +sgauth diff --git a/projects/sgauth/Makefile b/projects/sgauth/Makefile index 5565199b..99cd0e47 100644 --- a/projects/sgauth/Makefile +++ b/projects/sgauth/Makefile @@ -87,8 +87,15 @@ endif deps: $(SRCS) ../../Makefile.conf sgauth.css $(MAKE) -C $(DIR_LIBSRC) @>deps ;\ - ./make_css.sh + ./make_css.sh ;\ for file in $(SRCS); do\ - echo "`$(CC) $(CXXFLAGS) -MM $$file` Makefile" >> deps ;\ - printf '%b\n' '\t$$(CC) -c $$< $(CXXFLAGS)' >> deps ;\ + echo "$$file" | grep ".c$$" > /dev/null;\ + if [ $$? -eq 0 ];\ + then\ + echo "`$(CC) $(CFLAGS) -MM $$file` Makefile" >> deps ;\ + printf '%b\n' '\t$$(CC) $(CFLAGS) -c $$<' >> deps ;\ + else\ + echo "`$(CXX) $(CXXFLAGS) -MM $$file` Makefile" >> deps ;\ + printf '%b\n' '\t$$(CXX) $(CXXFLAGS) -c $$<' >> deps ;\ + fi;\ done diff --git a/projects/sgauth/build b/projects/sgauth/build index 51401204..ec747e2a 100755 --- a/projects/sgauth/build +++ b/projects/sgauth/build @@ -48,6 +48,7 @@ then 6) OS=bsd5;; 7) OS=bsd7;; 8) OS=bsd7;; + 9) OS=bsd7;; *) OS=unknown;; esac MAKE="gmake" diff --git a/projects/sgauthstress/Makefile b/projects/sgauthstress/Makefile index f688cffa..4474e77f 100644 --- a/projects/sgauthstress/Makefile +++ b/projects/sgauthstress/Makefile @@ -66,6 +66,13 @@ deps: $(SRCS) ../../Makefile.conf $(MAKE) -C $(DIR_LIBSRC) @>deps ;\ for file in $(SRCS); do\ - echo "`$(CC) $(CXXFLAGS) -MM $$file` Makefile ../../Makefile.conf" >> deps ;\ - printf '%b\n' '\t$$(CC) -c $$< $(CXXFLAGS)' >> deps ;\ + echo "$$file" | grep ".c$$" > /dev/null;\ + if [ $$? -eq 0 ];\ + then\ + echo "`$(CC) $(CFLAGS) -MM $$file` Makefile" >> deps ;\ + printf '%b\n' '\t$$(CC) $(CFLAGS) -c $$<' >> deps ;\ + else\ + echo "`$(CXX) $(CXXFLAGS) -MM $$file` Makefile" >> deps ;\ + printf '%b\n' '\t$$(CXX) $(CXXFLAGS) -c $$<' >> deps ;\ + fi;\ done diff --git a/projects/sgauthstress/build b/projects/sgauthstress/build index 05aba51b..d2cdf770 100755 --- a/projects/sgauthstress/build +++ b/projects/sgauthstress/build @@ -48,6 +48,7 @@ then 6) OS=bsd5;; 7) OS=bsd7;; 8) OS=bsd7;; + 9) OS=bsd7;; *) OS=unknown;; esac MAKE="gmake" diff --git a/projects/sgconf/Makefile b/projects/sgconf/Makefile index 0697b329..4d62bb53 100644 --- a/projects/sgconf/Makefile +++ b/projects/sgconf/Makefile @@ -87,6 +87,13 @@ deps: $(SRCS) ../../Makefile.conf $(MAKE) -C $(DIR_LIBSRC) @>deps ;\ for file in $(SRCS); do\ - echo "`$(CC) $(CXXFLAGS) -MM $$file` Makefile" >> deps ;\ - printf '%b\n' '\t$$(CC) -c $$< $(CXXFLAGS)' >> deps ;\ + echo "$$file" | grep ".c$$" > /dev/null;\ + if [ $$? -eq 0 ];\ + then\ + echo "`$(CC) $(CFLAGS) -MM $$file` Makefile" >> deps ;\ + printf '%b\n' '\t$$(CC) $(CFLAGS) -c $$<' >> deps ;\ + else\ + echo "`$(CXX) $(CXXFLAGS) -MM $$file` Makefile" >> deps ;\ + printf '%b\n' '\t$$(CXX) $(CXXFLAGS) -c $$<' >> deps ;\ + fi;\ done diff --git a/projects/sgconf/build b/projects/sgconf/build index 27f75399..1f6c0a0c 100755 --- a/projects/sgconf/build +++ b/projects/sgconf/build @@ -48,6 +48,7 @@ then 6) OS=bsd5;; 7) OS=bsd7;; 8) OS=bsd7;; + 9) OS=bsd7;; *) OS=unknown;; esac MAKE="gmake" diff --git a/projects/sgconf/parser.cpp b/projects/sgconf/parser.cpp index 8e1e3cf1..82b7ca9e 100644 --- a/projects/sgconf/parser.cpp +++ b/projects/sgconf/parser.cpp @@ -111,8 +111,7 @@ while (n != ans->end()) if (XML_Parse(parser, n->c_str(), len, done) == XML_STATUS_ERROR) { - char s[128]; - printf(s, "Parse error at line %d:\n%s\n", + printf("Parse error at line %d:\n%s\n", XML_GetCurrentLineNumber(parser), XML_ErrorString(XML_GetErrorCode(parser))); exit(UNKNOWN_ERR_CODE); diff --git a/projects/sgconf_xml/Makefile b/projects/sgconf_xml/Makefile index aefe7c12..b7ebca0a 100644 --- a/projects/sgconf_xml/Makefile +++ b/projects/sgconf_xml/Makefile @@ -87,6 +87,13 @@ deps: $(SRCS) ../../Makefile.conf $(MAKE) -C $(DIR_LIBSRC) @>deps ;\ for file in $(SRCS); do\ - echo "`$(CC) $(CXXFLAGS) -MM $$file` Makefile" >> deps ;\ - printf '%b\n' '\t$$(CC) -c $$< $(CXXFLAGS)' >> deps ;\ + echo "$$file" | grep ".c$$" > /dev/null;\ + if [ $$? -eq 0 ];\ + then\ + echo "`$(CC) $(CFLAGS) -MM $$file` Makefile" >> deps ;\ + printf '%b\n' '\t$$(CC) $(CFLAGS) -c $$<' >> deps ;\ + else\ + echo "`$(CXX) $(CXXFLAGS) -MM $$file` Makefile" >> deps ;\ + printf '%b\n' '\t$$(CXX) $(CXXFLAGS) -c $$<' >> deps ;\ + fi;\ done diff --git a/projects/sgconf_xml/build b/projects/sgconf_xml/build index c4ff46b5..f78e6f70 100755 --- a/projects/sgconf_xml/build +++ b/projects/sgconf_xml/build @@ -48,6 +48,7 @@ then 6) OS=bsd5;; 7) OS=bsd7;; 8) OS=bsd7;; + 9) OS=bsd7;; *) OS=unknown;; esac MAKE="gmake" diff --git a/projects/sgconf_xml/parser.cpp b/projects/sgconf_xml/parser.cpp index 99b48a7b..f2d5993b 100644 --- a/projects/sgconf_xml/parser.cpp +++ b/projects/sgconf_xml/parser.cpp @@ -166,8 +166,7 @@ while (n != ans->end()) if (XML_Parse(parser, n->c_str(), len, done) == XML_STATUS_ERROR) { - char s[128]; - printf(s, "Parse error at line %d: %s", + printf("Parse error at line %d: %s", XML_GetCurrentLineNumber(parser), XML_ErrorString(XML_GetErrorCode(parser))); return st_xml_parse_error; diff --git a/projects/stargazer/Makefile b/projects/stargazer/Makefile index 89326541..44ae35ec 100644 --- a/projects/stargazer/Makefile +++ b/projects/stargazer/Makefile @@ -93,6 +93,7 @@ install-data: ln -sf ../conf-available.d/mod_ia.conf $(PREFIX)/etc/stargazer/conf-enabled.d/mod_ia.conf ln -sf ../conf-available.d/mod_ping.conf $(PREFIX)/etc/stargazer/conf-enabled.d/mod_ping.conf ln -sf ../conf-available.d/mod_sg.conf $(PREFIX)/etc/stargazer/conf-enabled.d/mod_sg.conf + ln -sf ../conf-available.d/store_files.conf $(PREFIX)/etc/stargazer/conf-enabled.d/store_files.conf ifeq ($(OS),linux) ln -sf ../conf-available.d/mod_cap_ether.conf $(PREFIX)/etc/stargazer/conf-enabled.d/mod_cap_ether.conf @@ -138,6 +139,13 @@ deps: $(SRCS) ../../Makefile.conf $(MAKE) -C $(DIR_LIBSRC) @>deps ;\ for file in $(SRCS); do\ - echo "`$(CC) $(CXXFLAGS) -MM $$file` Makefile ../../Makefile.conf" >> deps ;\ - printf '%b\n' '\t$$(CC) -c $$< $(CXXFLAGS)' >> deps ;\ + echo "$$file" | grep ".c$$" > /dev/null;\ + if [ $$? -eq 0 ];\ + then\ + echo "`$(CC) $(CFLAGS) -MM $$file` Makefile" >> deps ;\ + printf '%b\n' '\t$$(CC) $(CFLAGS) -c $$<' >> deps ;\ + else\ + echo "`$(CXX) $(CXXFLAGS) -MM $$file` Makefile" >> deps ;\ + printf '%b\n' '\t$$(CXX) $(CXXFLAGS) -c $$<' >> deps ;\ + fi;\ done diff --git a/projects/stargazer/build b/projects/stargazer/build index 23d6677e..60c8e1ff 100755 --- a/projects/stargazer/build +++ b/projects/stargazer/build @@ -70,6 +70,7 @@ then 6) OS=bsd5;; 7) OS=bsd7;; 8) OS=bsd7;; + 9) OS=bsd7;; *) OS=unknown;; esac ETC_DIR="./inst/freebsd/etc/stargazer" diff --git a/projects/stargazer/plugins/capture/divert_freebsd/divert_cap.cpp b/projects/stargazer/plugins/capture/divert_freebsd/divert_cap.cpp index 60672048..a949433e 100644 --- a/projects/stargazer/plugins/capture/divert_freebsd/divert_cap.cpp +++ b/projects/stargazer/plugins/capture/divert_freebsd/divert_cap.cpp @@ -54,7 +54,6 @@ $Date: 2010/09/10 06:43:03 $ struct DIVERT_DATA { int sock; short int port; -unsigned char buffer[BUFF_LEN]; char iface[10]; }; //----------------------------------------------------------------------------- diff --git a/projects/stargazer/plugins/capture/ether_freebsd/ether_cap.cpp b/projects/stargazer/plugins/capture/ether_freebsd/ether_cap.cpp index 5835d077..24705111 100644 --- a/projects/stargazer/plugins/capture/ether_freebsd/ether_cap.cpp +++ b/projects/stargazer/plugins/capture/ether_freebsd/ether_cap.cpp @@ -73,8 +73,6 @@ return bcc.GetPlugin(); //----------------------------------------------------------------------------- int BPF_CAP_SETTINGS::ParseSettings(const MODULE_SETTINGS & s) { -std::string ifaces; - iface.erase(iface.begin(), iface.end()); if (s.moduleParams.empty()) diff --git a/projects/stargazer/plugins/capture/ether_linux/ether_cap.cpp b/projects/stargazer/plugins/capture/ether_linux/ether_cap.cpp index 632c1846..093aea72 100644 --- a/projects/stargazer/plugins/capture/ether_linux/ether_cap.cpp +++ b/projects/stargazer/plugins/capture/ether_linux/ether_cap.cpp @@ -154,7 +154,7 @@ sigset_t signalSet; sigfillset(&signalSet); pthread_sigmask(SIG_BLOCK, &signalSet, NULL); -ETHER_CAP * dc = (ETHER_CAP *)d; +ETHER_CAP * dc = static_cast(d); dc->isRunning = true; struct ETH_IP diff --git a/projects/stargazer/plugins/configuration/rpcconfig/tariffs_methods.cpp b/projects/stargazer/plugins/configuration/rpcconfig/tariffs_methods.cpp index 0b110d54..1643fbef 100644 --- a/projects/stargazer/plugins/configuration/rpcconfig/tariffs_methods.cpp +++ b/projects/stargazer/plugins/configuration/rpcconfig/tariffs_methods.cpp @@ -125,7 +125,6 @@ void METHOD_TARIFF_ADD::execute(xmlrpc_c::paramList const & paramList, { std::string cookie = paramList.getString(0); std::string tariff = paramList.getString(1); -std::string enc; paramList.verifyEnd(2); ADMIN_INFO adminInfo; diff --git a/projects/stargazer/plugins/configuration/rpcconfig/user_helper.cpp b/projects/stargazer/plugins/configuration/rpcconfig/user_helper.cpp index 00711e3d..fceaa3ab 100644 --- a/projects/stargazer/plugins/configuration/rpcconfig/user_helper.cpp +++ b/projects/stargazer/plugins/configuration/rpcconfig/user_helper.cpp @@ -12,8 +12,6 @@ void USER_HELPER::GetUserInfo(xmlrpc_c::value * info, bool hidePassword) { -std::string enc; - std::map structVal; structVal["result"] = xmlrpc_c::value_boolean(true); diff --git a/projects/stargazer/plugins/configuration/rpcconfig/users_methods.cpp b/projects/stargazer/plugins/configuration/rpcconfig/users_methods.cpp index 4932e146..48ef3103 100644 --- a/projects/stargazer/plugins/configuration/rpcconfig/users_methods.cpp +++ b/projects/stargazer/plugins/configuration/rpcconfig/users_methods.cpp @@ -19,7 +19,6 @@ void METHOD_USER_GET::execute(xmlrpc_c::paramList const & paramList, { std::string cookie = paramList.getString(0); std::string login = paramList.getString(1); -std::string enc; paramList.verifyEnd(2); std::map structVal; @@ -59,7 +58,6 @@ void METHOD_USER_ADD::execute(xmlrpc_c::paramList const & paramList, { std::string cookie = paramList.getString(0); std::string login = paramList.getString(1); -std::string enc; paramList.verifyEnd(2); ADMIN_INFO adminInfo; @@ -103,7 +101,6 @@ void METHOD_USER_DEL::execute(xmlrpc_c::paramList const & paramList, { std::string cookie = paramList.getString(0); std::string login = paramList.getString(1); -std::string enc; paramList.verifyEnd(2); ADMIN_INFO adminInfo; @@ -141,7 +138,6 @@ void METHOD_USERS_GET::execute(xmlrpc_c::paramList const & paramList, xmlrpc_c::value * const retvalPtr) { std::string cookie = paramList.getString(0); -std::string enc; paramList.verifyEnd(1); std::map structVal; @@ -195,7 +191,6 @@ void METHOD_USER_CHG::execute(xmlrpc_c::paramList const & paramList, std::string cookie = paramList.getString(0); std::string login = paramList.getString(1); xmlrpc_c::value_struct info(paramList.getStruct(2)); -std::string enc; paramList.verifyEnd(3); ADMIN_INFO adminInfo; @@ -248,7 +243,6 @@ std::string cookie = paramList.getString(0); std::string login = paramList.getString(1); double amount = paramList.getDouble(2); std::string comment = IconvString(paramList.getString(3), "UTF-8", "KOI8-R"); -std::string enc; paramList.verifyEnd(4); ADMIN_INFO adminInfo; @@ -298,7 +292,6 @@ std::string cookie = paramList.getString(0); std::string login = paramList.getString(1); double cash = paramList.getDouble(2); std::string comment = IconvString(paramList.getString(3), "UTF-8", "KOI8-R"); -std::string enc; paramList.verifyEnd(4); ADMIN_INFO adminInfo; @@ -346,7 +339,6 @@ std::string login = paramList.getString(1); std::string tariff = paramList.getString(2); bool delayed = paramList.getBoolean(3); std::string comment = IconvString(paramList.getString(4), "UTF-8", "KOI8-R"); -std::string enc; paramList.verifyEnd(5); ADMIN_INFO adminInfo; @@ -380,7 +372,8 @@ if (tariffs->FindByName(tariff)) if (u->GetProperty().nextTariff.Set(tariff, admin, login, - store)) + store, + comment)) { u->WriteConf(); *retvalPtr = xmlrpc_c::value_boolean(true); @@ -392,7 +385,8 @@ if (tariffs->FindByName(tariff)) if (u->GetProperty().tariffName.Set(tariff, admin, login, - store)) + store, + comment)) { u->ResetNextTariff(); u->WriteConf(); diff --git a/projects/stargazer/plugins/store/mysql/mysql_store.cpp b/projects/stargazer/plugins/store/mysql/mysql_store.cpp index e52c055d..9d8f9c83 100644 --- a/projects/stargazer/plugins/store/mysql/mysql_store.cpp +++ b/projects/stargazer/plugins/store/mysql/mysql_store.cpp @@ -163,11 +163,11 @@ MYSQL_STORE::MYSQL_STORE() //----------------------------------------------------------------------------- int MYSQL_STORE::MysqlQuery(const char* sQuery,MYSQL * sock) const { - int ret,i; + int ret; if( (ret = mysql_query(sock,sQuery)) ) { - for(i=0; i(d); struct tm t; time_t tt = stgTime; diff --git a/tests/.gitignore b/tests/.gitignore new file mode 100644 index 00000000..25ff3f8b --- /dev/null +++ b/tests/.gitignore @@ -0,0 +1,2 @@ +*.d +tests