Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion acdb/ats/adie/common/src/ats_adie_rtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ int32_t ats_adie_get_multiple_register(
if (rsp_buf_size < *rsp_buf_bytes_filled)
{
ATS_ERR("Error[%d]: Not enough memory to copy response. "
"The memory avalible is %d bytes and the size needed is &d bytes",
"The memory available is %d bytes and the size needed is &d bytes",
AR_ENEEDMORE, rsp_buf_size, *rsp_buf_bytes_filled);
}

Expand Down
2 changes: 1 addition & 1 deletion acdb/ats/fts/common/src/ats_fts.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ int32_t fts_open_file(

ATS_DBG("Opening/creating %s...", req.file_path);

//Search for avalible file slot
//Search for available file slot
for (; findex < FTS_MAX_FILE_COUNT; findex++)
if (fts_file_table->fhandle[findex] == NULL)
break;
Expand Down
4 changes: 2 additions & 2 deletions acdb/ats/src/ats_command.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ int32_t AtsCmdGetHeapEntryInfo(

if (AR_FAILED(status))
{
ATS_ERR("Error[%d]: Faild to get information from the ACDB heap",
ATS_ERR("Error[%d]: Failed to get information from the ACDB heap",
status);
}
return status;
Expand All @@ -110,7 +110,7 @@ int32_t AtsCmdGetHeapEntryData(acdb_handle_t acdb_handle,
status = DataProcGetHeapData(key_vector, rsp, &rsp_offset);
if (AR_FAILED(status))
{
ATS_ERR("Faild to get heap data for key vector");
ATS_ERR("Failed to get heap data for key vector");
}

rsp->bytes_filled = rsp_offset;
Expand Down
30 changes: 15 additions & 15 deletions acdb/ats/transports/tcpip/linux/src/ats_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ void* ats_server_transmit_routine(void* client_socket_ptr)
while (true)
{
//keep listening for whole incoming messages
int32_t bytes_recieved = 0;
int32_t bytes_received = 0;
uint32_t headerBytesRead = 0;
uint32_t msg_len = 0;
//---------------------------
Expand All @@ -532,7 +532,7 @@ void* ats_server_transmit_routine(void* client_socket_ptr)
{
//receive full message header
ATS_ERR("Waiting to recieve message...");
bytes_recieved = recv(client_socket, recvbuf, ATS_HEADER_LENGTH - headerBytesRead, 0);
bytes_received = recv(client_socket, recvbuf, ATS_HEADER_LENGTH - headerBytesRead, 0);

//client sends "QUIT" to signal end of connection. At that point, close socket and return.
if (strncmp(recvbuf, ATS_SERVER_CMD_QUIT, 4) == 0)
Expand All @@ -543,25 +543,25 @@ void* ats_server_transmit_routine(void* client_socket_ptr)
goto threaddone;
}

if (bytes_recieved > 0)
if (bytes_received > 0)
{
ATS_DBG("Recieved %d bytes", bytes_recieved);
ACDB_MEM_CPY_SAFE(msgBuf + headerBytesRead, bytes_recieved, recvbuf, bytes_recieved);
headerBytesRead += bytes_recieved;
ATS_DBG("Received %d bytes", bytes_received);
ACDB_MEM_CPY_SAFE(msgBuf + headerBytesRead, bytes_received, recvbuf, bytes_received);
headerBytesRead += bytes_received;

//this determines how many bytes to expect (thus determining how many times to loop).
if (get_command_length_s(msgBuf, bytes_recieved, &msg_len))
if (get_command_length_s(msgBuf, bytes_received, &msg_len))
{
svc_cmd_id = 0;
ACDB_MEM_CPY_SAFE(&svc_cmd_id, ATS_SERVICE_COMMAND_ID_LENGTH,
msgBuf + ATS_SERVICE_COMMAND_ID_POSITION, ATS_SERVICE_COMMAND_ID_LENGTH);

ATS_SERVICE_ID_STR(svc_id_str, ATS_SEVICE_ID_STR_LEN, svc_cmd_id);
ATS_ERR("Recieved Command[%s-%d] with length %d bytes", svc_id_str, ATS_GET_COMMAND_ID(svc_cmd_id), msg_len);
ATS_ERR("Received Command[%s-%d] with length %d bytes", svc_id_str, ATS_GET_COMMAND_ID(svc_cmd_id), msg_len);
break;
}
}
else if (bytes_recieved <= 0)
else if (bytes_received <= 0)
{
if (errno == EINTR) continue;

Expand All @@ -587,17 +587,17 @@ void* ats_server_transmit_routine(void* client_socket_ptr)
uint32_t recv_len = remaining_recv_len > ATS_RECIEVE_BUF_SIZE ? remaining_recv_len : ATS_RECIEVE_BUF_SIZE;

//will receive min(ATS_RECIEVE_BUF_SIZE, bytes left to receive to complete message)
bytes_recieved = recv(client_socket, recvbuf, recv_len, 0);
bytes_received = recv(client_socket, recvbuf, recv_len, 0);

if (bytes_recieved > 0) {
ATS_ERR("Recieved %d bytes", bytes_recieved);
ACDB_MEM_CPY_SAFE(msgBuf + ATS_HEADER_LENGTH + payload_bytes_read, bytes_recieved, recvbuf, bytes_recieved);
payload_bytes_read += bytes_recieved;
if (bytes_received > 0) {
ATS_ERR("Received %d bytes", bytes_received);
ACDB_MEM_CPY_SAFE(msgBuf + ATS_HEADER_LENGTH + payload_bytes_read, bytes_received, recvbuf, bytes_received);
payload_bytes_read += bytes_received;
if (payload_bytes_read == msg_len) {
break;
}
}
else if (bytes_recieved <= 0) {
else if (bytes_received <= 0) {
if (errno == EINTR) {
ATS_ERR("Signal interrupt. Continuing...");
continue;
Expand Down
34 changes: 17 additions & 17 deletions acdb/ats/transports/tcpip_server/src/tcpip_cmd_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ int32_t TcpipCmdServer::recv_message_header(char_t *msgBuf, uint32_t msgbuflen,
char_t *recvbuf, uint32_t recvbuflen, uint32_t &msg_len)
{
int32_t status = AR_EOK;
int32_t bytes_recieved = 0;
int32_t bytes_received = 0;
int32_t headerBytesRead = 0;
char svc_id_str[ATS_SEVICE_ID_STR_LEN] = { 0 };
uint32_t svc_cmd_id = 0;
Expand All @@ -566,24 +566,24 @@ int32_t TcpipCmdServer::recv_message_header(char_t *msgBuf, uint32_t msgbuflen,
{
return AR_EBADPARAM;
}
status = ar_socket_recv(accept_socket, recvbuf, ATS_HEADER_LENGTH - headerBytesRead, 0, &bytes_recieved);
status = ar_socket_recv(accept_socket, recvbuf, ATS_HEADER_LENGTH - headerBytesRead, 0, &bytes_received);

if (bytes_recieved < 0)
if (bytes_received < 0)
{
if (AR_SOCKET_LAST_ERROR == EINTR) continue;

TCPIP_CMD_SVR_ERR("Receive failed with error: %d\n", AR_SOCKET_LAST_ERROR);
ar_socket_close(accept_socket);
return AR_EFAILED;
}
else if (bytes_recieved == 0)
else if (bytes_received == 0)
{
TCPIP_CMD_SVR_INFO("Client shutdown socket. Closing connection...");
ar_socket_close(accept_socket);
return AR_ETERMINATED;
}

TCPIP_CMD_SVR_DBG("Recieved %d bytes", bytes_recieved);
TCPIP_CMD_SVR_DBG("Received %d bytes", bytes_received);

/* The client sends "QUIT" to signal end of connection. The server will close
* the socket and return */
Expand All @@ -598,18 +598,18 @@ int32_t TcpipCmdServer::recv_message_header(char_t *msgBuf, uint32_t msgbuflen,
{
return AR_EBADPARAM;
}
ar_mem_cpy(msgBuf + headerBytesRead, bytes_recieved, recvbuf, bytes_recieved);
headerBytesRead += bytes_recieved;
ar_mem_cpy(msgBuf + headerBytesRead, bytes_received, recvbuf, bytes_received);
headerBytesRead += bytes_received;

//this determines how many bytes to expect (thus determining how many times to loop).
if (tcpip_cmd_server_get_ats_command_length(msgBuf, bytes_recieved, &msg_len))
if (tcpip_cmd_server_get_ats_command_length(msgBuf, bytes_received, &msg_len))
{
svc_cmd_id = 0;
ar_mem_cpy(&svc_cmd_id, ATS_SERVICE_COMMAND_ID_LENGTH,
msgBuf + ATS_SERVICE_COMMAND_ID_POSITION, ATS_SERVICE_COMMAND_ID_LENGTH);

ATS_SERVICE_ID_STR(svc_id_str, ATS_SEVICE_ID_STR_LEN, svc_cmd_id);
TCPIP_CMD_SVR_DBG("Recieved Command[%s-%d] with length %d bytes", svc_id_str, ATS_GET_COMMAND_ID(svc_cmd_id), msg_len);
TCPIP_CMD_SVR_DBG("Received Command[%s-%d] with length %d bytes", svc_id_str, ATS_GET_COMMAND_ID(svc_cmd_id), msg_len);
break;
}
}
Expand All @@ -624,7 +624,7 @@ int32_t TcpipCmdServer::recv_message(char_t *msgBuf, uint32_t msgbuflen,
{
__UNREFERENCED_PARAM(recvbuflen);
int32_t status = AR_EOK;
int32_t bytes_recieved = 0;
int32_t bytes_received = 0;
uint32_t message_bytes_read = 0;
uint32_t remaining_message_length = 0;
uint32_t recv_len = 0;
Expand Down Expand Up @@ -659,11 +659,11 @@ int32_t TcpipCmdServer::recv_message(char_t *msgBuf, uint32_t msgbuflen,
remaining_message_length : TCPIP_CMD_SERVER_RECV_BUFFER_SIZE;

//will receive min(TCPIP_CMD_SERVER_RECV_BUFFER_SIZE, bytes left to receive to complete message)
bytes_recieved = recv(accept_socket, recvbuf, recv_len, 0);
bytes_received = recv(accept_socket, recvbuf, recv_len, 0);

if (bytes_recieved > 0)
if (bytes_received > 0)
{
TCPIP_CMD_SVR_DBG("Recieved %d bytes", bytes_recieved);
TCPIP_CMD_SVR_DBG("Received %d bytes", bytes_received);

if (should_write_msg)
{
Expand All @@ -675,17 +675,17 @@ int32_t TcpipCmdServer::recv_message(char_t *msgBuf, uint32_t msgbuflen,
return AR_ENEEDMORE;
}

ar_mem_cpy(msgBuf + ATS_HEADER_LENGTH + message_bytes_read, bytes_recieved,
recvbuf, bytes_recieved);
ar_mem_cpy(msgBuf + ATS_HEADER_LENGTH + message_bytes_read, bytes_received,
recvbuf, bytes_received);
}

message_bytes_read += bytes_recieved;
message_bytes_read += bytes_received;
if (message_bytes_read == data_length)
{
break;
}
}
else if (bytes_recieved <= 0)
else if (bytes_received <= 0)
{
if (AR_SOCKET_LAST_ERROR == EINTR)
{
Expand Down
2 changes: 1 addition & 1 deletion acdb/inc/acdb_delta_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ struct _acdb_delta_file_man_file_info_t {
uint32_t acdb_file_index;
/**< A flag indicating whether the delta file is updated */
uint32_t is_updated;
/**< A flag that determines the existance of the delta file */
/**< A flag that determines the existence of the delta file */
uint32_t exists;
/**< The size of the delta file */
uint32_t file_size;
Expand Down
2 changes: 1 addition & 1 deletion acdb/inc/acdb_utility.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@

#define ACDB_FREE(data) AcdbFree((void*)data)

//TODO: Remove this function once its avalible in the OSAL
//TODO: Remove this function once its available in the OSAL
#ifndef ar_sscanf
#if defined(_WIN64) || defined(_WIN32)
#define ar_sscanf(buf, format, ...) sscanf_s(buf, format, __VA_ARGS__)
Expand Down
2 changes: 1 addition & 1 deletion acdb/src/acdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,7 @@ int32_t acdb_cmd_set_temp_path(AcdbSetTempPathReq *req)
else if (AR_FAILED(status))
{
ACDB_ERR("Error[%d]: An error occured while trying to verify"
" the existance of the following path %s", status,
" the existence of the following path %s", status,
&swap_finfo.path_info.path[0]);
return status;
}
Expand Down
4 changes: 2 additions & 2 deletions acdb/src/acdb_command.c
Original file line number Diff line number Diff line change
Expand Up @@ -11193,7 +11193,7 @@ int32_t AcdbZip1(uint32_t num_elem_1, uint32_t *list_1,

/**
* \brief
* Checks for the existance of a CKV within the lookup table
* Checks for the existence of a CKV within the lookup table
*
* \param[in] kv_list: contains the key id and value lists that are
* used to compare against an entry in the lookup table
Expand Down Expand Up @@ -13867,7 +13867,7 @@ int32_t AcdbGetParameterCalData(AcdbParameterCalData *req, AcdbBlob* rsp)
if (AR_FAILED(status))
{
//Either CKV not found or another error occured
ACDB_ERR("Error[%d]: Could not find a matcing CKV.", status);
ACDB_ERR("Error[%d]: Could not find a matching CKV.", status);
return status;
}

Expand Down
2 changes: 1 addition & 1 deletion acdb/src/acdb_delta_file_mgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ struct _acdb_delta_file_man_database_info_t {
uint32_t acdb_file_index;
/**< A flag indicating whether the delta file is updated */
uint32_t is_updated;
/**< A flag that determines the existance of the delta file */
/**< A flag that determines the existence of the delta file */
uint32_t exists;
/**< The size of the delta file */
uint32_t file_size;
Expand Down
8 changes: 4 additions & 4 deletions acdb/src/acdb_file_mgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,11 @@ int32_t AcdbFileManRemoveDatabase(acdb_file_man_handle_t* fm_handle);
/**
* \brief
* 1. Comparing Imports to Exports
* Checks for the existance of imports in the newly added
* Checks for the existence of imports in the newly added
* database compared to the exports in existing databases
*
* 2. Comparing Exports to Imports
* Checks for the existance of exports in the newly added
* Checks for the existence of exports in the newly added
* database compared to the imports in existing databases
*
* If subgraphs are found between the new database and the
Expand Down Expand Up @@ -1147,7 +1147,7 @@ int32_t AcdbFileManGetHostDatabaseFileInfo(AcdbFileManBlob* rsp)

if (sz_file_info_rsp > rsp->size)
{
ACDB_ERR("Error[%d]: There isnt enough memory to "
ACDB_ERR("Error[%d]: There isn't enough memory to "
"copy file information", AR_ENOMEMORY);
return AR_ENOMEMORY;
}
Expand Down Expand Up @@ -1295,7 +1295,7 @@ int32_t AcdbFileManGetAllDatabasesFileInfo(AcdbFileManBlob* rsp)

if (sz_file_info_rsp > rsp->size)
{
ACDB_ERR("Error[%d]: There isnt enough memory to "
ACDB_ERR("Error[%d]: There isn't enough memory to "
"copy file information", AR_ENOMEMORY);
return AR_ENOMEMORY;
}
Expand Down
2 changes: 1 addition & 1 deletion acdb/src/acdb_heap.c
Original file line number Diff line number Diff line change
Expand Up @@ -833,7 +833,7 @@ int32_t acdb_heap_add_database(uint32_t vm_id, acdb_heap_handle_t *handle)

ACDB_MUTEX_LOCK(acdb_heap_context.heap_lock);

/* find next avalible slot */
/* find next available slot */
for (index = 0; index < MAX_ACDB_FILE_COUNT; index++)
{
if (IsNull(acdb_heap_context.heap_info[index]))
Expand Down
14 changes: 7 additions & 7 deletions acdb/src/acdb_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ int32_t acdb_init_add_database(acdb_init_database_paths_t *database_paths,
uint32_t remaining_file_slots = 0;
uint32_t num_data_files = 0;
bool_t should_ignore_delta_file = FALSE;
bool_t is_writable_path_avalible = FALSE;
bool_t is_writable_path_available = FALSE;
acdb_file_version_t acdb_file_version = { 0 };
AcdbFileManFileInfo *fm_file_info = NULL;
AcdbDeltaFileManFileInfo *dfm_file_info = NULL;
Expand All @@ -289,7 +289,7 @@ int32_t acdb_init_add_database(acdb_init_database_paths_t *database_paths,

if (database_paths->num_files > ACDB_MAX_FILE_ADD_LIMIT)
{
ACDB_ERR("Error[%d]: The max number of files that can be initalized "
ACDB_ERR("Error[%d]: The max number of files that can be initialized "
"is %d: one *.qwsp and one *.acdb", AR_EBADPARAM,
ACDB_MAX_FILE_ADD_LIMIT);
return AR_EBADPARAM;
Expand All @@ -305,7 +305,7 @@ int32_t acdb_init_add_database(acdb_init_database_paths_t *database_paths,
goto end;
}

is_writable_path_avalible = !IsNull(database_paths->writable_path.path);
is_writable_path_available = !IsNull(database_paths->writable_path.path);

fm_db_files.num_files = database_paths->num_files;
fm_file_info = ACDB_MALLOC(
Expand Down Expand Up @@ -353,7 +353,7 @@ int32_t acdb_init_add_database(acdb_init_database_paths_t *database_paths,
num_data_files++;

/* Load delta file */
if (is_writable_path_avalible)
if (is_writable_path_available)
{
status = AcdbInitLoadDeltaFile(
&fm_file_info[i], &acdb_file_version,
Expand Down Expand Up @@ -391,7 +391,7 @@ int32_t acdb_init_add_database(acdb_init_database_paths_t *database_paths,
(uint8_t*)&fm_ctx_handle.vm_id, sizeof(uint32_t),
(uint8_t*)&ctx_handle.heap_handle, sizeof(acdb_heap_handle_t));

if (is_writable_path_avalible && !should_ignore_delta_file)
if (is_writable_path_available && !should_ignore_delta_file)
{
dfm_file_info[i].vm_id = fm_ctx_handle.vm_id;
dfm_file_info[i].acdb_file_index = findex;
Expand Down Expand Up @@ -423,7 +423,7 @@ int32_t acdb_init_add_database(acdb_init_database_paths_t *database_paths,

/* Load the contents of the delta file into the heap */

if (is_writable_path_avalible && !should_ignore_delta_file)
if (is_writable_path_available && !should_ignore_delta_file)
{
uint32_t delta_status = acdb_delta_data_ioctl(ACDB_DELTA_DATA_CMD_INIT_HEAP,
&ctx_handle, sizeof(acdb_context_handle_t),
Expand All @@ -435,7 +435,7 @@ int32_t acdb_init_add_database(acdb_init_database_paths_t *database_paths,
}
}

if (is_writable_path_avalible)
if (is_writable_path_available)
{
/* The delta file path serves two purposes:
* 1. to store the delta files
Expand Down
2 changes: 1 addition & 1 deletion gsl/src/gsl_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ int32_t gsl_send_spf_cmd_wait_for_basic_rsp(gpr_packet_t **packet,
if (!rc && rsp && rsp->opcode == GPR_IBASIC_RSP_RESULT) {
basic_rsp = GPR_PKT_GET_PAYLOAD(struct spf_cmd_basic_rsp, rsp);
if (cached_opcode != basic_rsp->opcode) {
GSL_ERR("Recieved unexpected rsp opcode %x, expected %x",
GSL_ERR("Received unexpected rsp opcode %x, expected %x",
basic_rsp->opcode, cached_opcode);
rc = AR_EUNEXPECTED;
}
Expand Down
2 changes: 1 addition & 1 deletion gsl/src/gsl_cshm_mgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ static int32_t gsl_cshm_handle_rsp(gpr_packet_t *rsp, uint32_t expected_opcode)
};

if (expected_opcode != rsp->opcode) {
GSL_ERR("Recieved unexpected rsp opcode %x, expected %x",
GSL_ERR("Received unexpected rsp opcode %x, expected %x",
rsp->opcode, expected_opcode);
rc = AR_EUNEXPECTED;
}
Expand Down
Loading
Loading