1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-12-17 01:02:23 +03:00

Changed ownership of the socket.

This commit is contained in:
Patrick LeBlanc
2019-02-04 14:44:35 -06:00
parent 4769e896f8
commit 8ef4e09aa4
23 changed files with 105 additions and 108 deletions

View File

@@ -16,26 +16,26 @@ ReadTask::~ReadTask()
{
}
#define check_error(msg) \
#define check_error(msg, ret) \
if (!success) \
{ \
handleError(msg, errno); \
return; \
return ret; \
}
void ReadTask::run()
bool ReadTask::run()
{
uint8_t buf[1024] = {0};
// get the parameters
if (getLength() > 1023) {
handleError("ReadTask read", EFAULT);
return;
return true;
}
bool success;
success = read(buf, getLength());
check_error("ReadTask read cmd");
check_error("ReadTask read cmd", false);
cmd_overlay *cmd = (cmd_overlay *) buf;
// read from IOC, write to the socket
@@ -67,7 +67,8 @@ void ReadTask::run()
count += err;
}
write(outbuf);
success = write(outbuf);
return success;
}