git.stg.codes
/
stg.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed tag named, keep old values using Splice.
[stg.git]
/
stglibs
/
srvconf.lib
/
netunit.cpp
diff --git
a/stglibs/srvconf.lib/netunit.cpp
b/stglibs/srvconf.lib/netunit.cpp
index baf02004930b76984495a16b55142466889ec172..42b301a5a515c249429901446032775352518fae 100644
(file)
--- a/
stglibs/srvconf.lib/netunit.cpp
+++ b/
stglibs/srvconf.lib/netunit.cpp
@@
-45,8
+45,6
@@
using namespace STG;
namespace
{
namespace
{
-const std::string::size_type MAX_XML_CHUNK_LENGTH = 2048;
-
struct ReadState
{
bool final;
struct ReadState
{
bool final;
@@
-124,7
+122,7
@@
if (!localAddress.empty())
struct hostent * phe = gethostbyname(localAddress.c_str());
if (phe == NULL)
{
struct hostent * phe = gethostbyname(localAddress.c_str());
if (phe == NULL)
{
- errorMsg = "
DNS error.\nCan not reslove " + localAddress
;
+ errorMsg = "
Can not reslove '" + localAddress + "'"
;
return st_dns_err;
}
return st_dns_err;
}
@@
-156,7
+154,7
@@
if (ip == INADDR_NONE)
struct hostent * phe = gethostbyname(server.c_str());
if (phe == NULL)
{
struct hostent * phe = gethostbyname(server.c_str());
if (phe == NULL)
{
- errorMsg = "
DNS error.\nCan not reslove " + server
;
+ errorMsg = "
Can not reslove '" + server + "'"
;
return st_dns_err;
}
return st_dns_err;
}
@@
-343,7
+341,7
@@
int NETTRANSACT::TxData(const std::string & text)
{
STG::ENCRYPT_STREAM stream(password, TxCrypto, this);
stream.Put(text.c_str(), text.length() + 1, true);
{
STG::ENCRYPT_STREAM stream(password, TxCrypto, this);
stream.Put(text.c_str(), text.length() + 1, true);
-if (!stream.
i
sOk())
+if (!stream.
I
sOk())
{
errorMsg = SEND_DATA_ERROR;
return st_send_fail;
{
errorMsg = SEND_DATA_ERROR;
return st_send_fail;
@@
-367,7
+365,7
@@
while (!state.final)
return st_recv_fail;
}
stream.Put(buffer, res, res == 0);
return st_recv_fail;
}
stream.Put(buffer, res, res == 0);
- if (!stream.
i
sOk())
+ if (!stream.
I
sOk())
return st_xml_parse_error;
}
return st_xml_parse_error;
}