1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-12-18 13:54:11 +03:00

Working on defining message structures and unit tests for

the PosixTask subclasses.
This commit is contained in:
Patrick LeBlanc
2019-01-31 14:43:32 -06:00
parent 0ef3caca9e
commit 13af644425
14 changed files with 335 additions and 99 deletions

View File

@@ -45,19 +45,20 @@ void OpenTask::run()
return;
}
cmd_overlay *cmd = (cmd_overlay *) buf;
int err = ioc->open(cmd->filename, cmd->openmode, (struct stat *) &buf[SM_HEADER_LEN]);
open_cmd *cmd = (open_cmd *) buf;
int err = ioc->open(cmd->filename, cmd->openmode, (struct stat *) &buf[sizeof(sm_msg_resp)]);
if (err)
{
handleError("OpenTask open", errno);
return;
}
uint32_t *buf32 = (uint32_t *) buf;
buf32[0] = SM_MSG_START;
buf32[1] = sizeof(struct stat);
success = write(buf, sizeof(struct stat) + SM_HEADER_LEN);
sm_msg_resp *resp = (sm_msg_resp *) buf;
resp->type = SM_MSG_START;
resp->payloadLen = sizeof(struct stat) + 4;
resp->returnCode = 0;
success = write(buf, sizeof(struct stat) + sizeof(sm_msg_resp));
if (!success)
handleError("OpenTask write", errno);
}