git.stg.codes
/
stg.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix BPF capture plugin compilation errors
[stg.git]
/
stglibs
/
srvconf.lib
/
parser.cpp
diff --git
a/stglibs/srvconf.lib/parser.cpp
b/stglibs/srvconf.lib/parser.cpp
index 139c91bc6dc0a1b775ec11df1977523cda393498..d7c7568f848aaf63fc2f9b1c3198dc274090621a 100644
(file)
--- a/
stglibs/srvconf.lib/parser.cpp
+++ b/
stglibs/srvconf.lib/parser.cpp
@@
-33,9
+33,8
@@
#include <arpa/inet.h>
#include <string>
#include <arpa/inet.h>
#include <string>
-#include "common.h"
-//#include "srvconf_common.h"
-#include "stg_const.h"
+#include "stg/common.h"
+#include "stg/stg_const.h"
#include "servconf.h"
using namespace std;
#include "servconf.h"
using namespace std;
@@
-46,6
+45,7
@@
using namespace std;
PARSER_GET_USERS::PARSER_GET_USERS()
: RecvUserDataCb(NULL),
userDataCb(NULL),
PARSER_GET_USERS::PARSER_GET_USERS()
: RecvUserDataCb(NULL),
userDataCb(NULL),
+ user(),
depth(0),
error(false)
{
depth(0),
error(false)
{
@@
-165,6
+165,14
@@
if (strcasecmp(el, "credit") == 0)
}
}
}
}
+if (strcasecmp(el, "creditExpire") == 0)
+ {
+ if (str2x(attr[1], user.creditExpire) < 0)
+ {
+ return;
+ }
+ }
+
/*if (strcasecmp(el, "freemb") == 0)
{
if (strtodouble2(attr[1], user.freeMb) < 0)
/*if (strcasecmp(el, "freemb") == 0)
{
if (strtodouble2(attr[1], user.freeMb) < 0)
@@
-379,6
+387,7
@@
userDataCb = data;
PARSER_GET_USER::PARSER_GET_USER()
: RecvUserDataCb(NULL),
userDataCb(NULL),
PARSER_GET_USER::PARSER_GET_USER()
: RecvUserDataCb(NULL),
userDataCb(NULL),
+ user(),
depth(0),
error(false)
{
depth(0),
error(false)
{
@@
-518,6
+527,14
@@
if (strcasecmp(el, "currip") == 0)
user.ip = inet_addr(attr[1]);
}
user.ip = inet_addr(attr[1]);
}
+if (strcasecmp(el, "creditExpire") == 0)
+ {
+ if (str2x(attr[1], user.creditExpire) < 0)
+ {
+ return;
+ }
+ }
+
for (int i = 0; i < USERDATA_NUM; i++)
{
string num;
for (int i = 0; i < USERDATA_NUM; i++)
{
string num;
@@
-649,7
+666,8
@@
PARSER_GET_SERVER_INFO::PARSER_GET_SERVER_INFO()
: RecvServerInfoDataCb(NULL),
serverInfoDataCb(NULL),
depth(0),
: RecvServerInfoDataCb(NULL),
serverInfoDataCb(NULL),
depth(0),
- error(false)
+ error(false),
+ serverInfo()
{
}
//-----------------------------------------------------------------------------
{
}
//-----------------------------------------------------------------------------