mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-13 02:39:34 +00:00
Changed: Minor changes
This commit is contained in:
parent
04407be1cc
commit
9e1b9d8050
2 changed files with 4 additions and 4 deletions
|
@ -261,11 +261,11 @@ bool CCurlHttpClient::receive(string &res, bool verbose)
|
||||||
{
|
{
|
||||||
if (verbose)
|
if (verbose)
|
||||||
{
|
{
|
||||||
nldebug("Receiving %u bytes", _ReceiveBuffer.size());
|
nldebug("Receiving %u bytes", (uint)_ReceiveBuffer.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
res.clear();
|
res.clear();
|
||||||
if (_ReceiveBuffer.size())
|
if (!_ReceiveBuffer.empty())
|
||||||
res.assign((const char*)&(*(_ReceiveBuffer.begin())), _ReceiveBuffer.size());
|
res.assign((const char*)&(*(_ReceiveBuffer.begin())), _ReceiveBuffer.size());
|
||||||
_ReceiveBuffer.clear();
|
_ReceiveBuffer.clear();
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -193,14 +193,14 @@ bool CHttpClient::receive(string &res, bool verbose)
|
||||||
|
|
||||||
if (_Sock.receive((uint8*)buf, size, false) == CSock::Ok)
|
if (_Sock.receive((uint8*)buf, size, false) == CSock::Ok)
|
||||||
{
|
{
|
||||||
if (verbose) nlinfo("Received OK %d bytes", size);
|
if (verbose) nlinfo("Received OK %u bytes", size);
|
||||||
buf[1023] = '\0';
|
buf[1023] = '\0';
|
||||||
res += (char*)buf;
|
res += (char*)buf;
|
||||||
//nlinfo("block received '%s'", buf);
|
//nlinfo("block received '%s'", buf);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (verbose) nlinfo("Received CLOSE %d bytes", size);
|
if (verbose) nlinfo("Received CLOSE %u bytes", size);
|
||||||
buf[size] = '\0';
|
buf[size] = '\0';
|
||||||
res += (char*)buf;
|
res += (char*)buf;
|
||||||
//nlwarning ("server connection closed");
|
//nlwarning ("server connection closed");
|
||||||
|
|
Loading…
Reference in a new issue