git.stg.codes
/
stg.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Better error reporting in netunit.cpp.
[stg.git]
/
include
/
stg
/
user_conf.h
diff --git
a/include/stg/user_conf.h
b/include/stg/user_conf.h
index d5acb23827c2d9cf16f48b0767882809fe1a4c8e..fe458211b2ef69c8f8e8ca50f63756b95d205e1c 100644
(file)
--- a/
include/stg/user_conf.h
+++ b/
include/stg/user_conf.h
@@
-104,8
+104,7
@@
struct USER_CONF_RES
credit = uc.credit;
nextTariff = uc.nextTariff;
for (size_t i = 0; i < USERDATA_NUM; i++) userdata[i] = uc.userdata[i];
credit = uc.credit;
nextTariff = uc.nextTariff;
for (size_t i = 0; i < USERDATA_NUM; i++) userdata[i] = uc.userdata[i];
- services.resize(uc.services.size());
- for (size_t i = 0; i < uc.services.size(); ++i) services[i] = uc.services[i];
+ services = uc.services;
creditExpire = uc.creditExpire;
ips = uc.ips;
return *this;
creditExpire = uc.creditExpire;
ips = uc.ips;
return *this;
@@
-132,9
+131,7
@@
struct USER_CONF_RES
{
uc.userdata[i] = userdata[i].data();
}
{
uc.userdata[i] = userdata[i].data();
}
- uc.services.resize(services.size());
- for (size_t i = 0; i < services.size(); ++i)
- uc.services[i] = services[i].data();
+ uc.services = services.data();
uc.creditExpire = creditExpire.data();
uc.ips = ips.data();
return uc;
uc.creditExpire = creditExpire.data();
uc.ips = ips.data();
return uc;
@@
-157,7
+154,7
@@
struct USER_CONF_RES
RESETABLE<double> credit;
RESETABLE<std::string> nextTariff;
std::vector<RESETABLE<std::string> > userdata;
RESETABLE<double> credit;
RESETABLE<std::string> nextTariff;
std::vector<RESETABLE<std::string> > userdata;
-
std::vector<RESETABLE
<std::string> > services;
+
RESETABLE<std::vector
<std::string> > services;
RESETABLE<time_t> creditExpire;
RESETABLE<USER_IPS> ips;
};
RESETABLE<time_t> creditExpire;
RESETABLE<USER_IPS> ips;
};