mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-04-24 15:02:55 +00:00
psa_ff_client: fix typos and useless blank lines
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
This commit is contained in:
parent
f57afd5acd
commit
dce6b85af8
@ -67,7 +67,6 @@ static int handle_is_valid(psa_handle_t handle)
|
|||||||
|
|
||||||
static int get_queue_info(char *path, int *cqid, int *sqid)
|
static int get_queue_info(char *path, int *cqid, int *sqid)
|
||||||
{
|
{
|
||||||
|
|
||||||
key_t server_queue_key;
|
key_t server_queue_key;
|
||||||
int rx_qid, server_qid;
|
int rx_qid, server_qid;
|
||||||
|
|
||||||
@ -97,7 +96,6 @@ static int get_queue_info(char *path, int *cqid, int *sqid)
|
|||||||
static psa_status_t process_response(int rx_qid, vectors_t *vecs, int type,
|
static psa_status_t process_response(int rx_qid, vectors_t *vecs, int type,
|
||||||
int *internal_server_qid)
|
int *internal_server_qid)
|
||||||
{
|
{
|
||||||
|
|
||||||
struct message response, request;
|
struct message response, request;
|
||||||
psa_status_t ret = PSA_ERROR_CONNECTION_REFUSED;
|
psa_status_t ret = PSA_ERROR_CONNECTION_REFUSED;
|
||||||
size_t invec_seek[4] = { 0 };
|
size_t invec_seek[4] = { 0 };
|
||||||
@ -111,13 +109,13 @@ static psa_status_t process_response(int rx_qid, vectors_t *vecs, int type,
|
|||||||
invec = 0;
|
invec = 0;
|
||||||
outvec = 0;
|
outvec = 0;
|
||||||
|
|
||||||
// read response from server
|
/* read response from server */
|
||||||
if (msgrcv(rx_qid, &response, sizeof(struct message_text), 0, 0) == -1) {
|
if (msgrcv(rx_qid, &response, sizeof(struct message_text), 0, 0) == -1) {
|
||||||
ERROR(" msgrcv failed");
|
ERROR(" msgrcv failed");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
// process return message from server
|
/* process return message from server */
|
||||||
switch (response.message_type) {
|
switch (response.message_type) {
|
||||||
case PSA_REPLY:
|
case PSA_REPLY:
|
||||||
memcpy(&ret, response.message_text.buf, sizeof(psa_status_t));
|
memcpy(&ret, response.message_text.buf, sizeof(psa_status_t));
|
||||||
@ -209,7 +207,6 @@ static psa_status_t process_response(int rx_qid, vectors_t *vecs, int type,
|
|||||||
static psa_status_t send(int rx_qid, int server_qid, int *internal_server_qid,
|
static psa_status_t send(int rx_qid, int server_qid, int *internal_server_qid,
|
||||||
int32_t type, uint32_t minor_version, vectors_t *vecs)
|
int32_t type, uint32_t minor_version, vectors_t *vecs)
|
||||||
{
|
{
|
||||||
{
|
|
||||||
psa_status_t ret = PSA_ERROR_CONNECTION_REFUSED;
|
psa_status_t ret = PSA_ERROR_CONNECTION_REFUSED;
|
||||||
size_t request_msg_size = (sizeof(int) + sizeof(long)); /* msg type plus queue id */
|
size_t request_msg_size = (sizeof(int) + sizeof(long)); /* msg type plus queue id */
|
||||||
struct message request;
|
struct message request;
|
||||||
@ -261,14 +258,13 @@ static psa_status_t send(int rx_qid, int server_qid, int *internal_server_qid,
|
|||||||
|
|
||||||
INFO(" Sending and then waiting");
|
INFO(" Sending and then waiting");
|
||||||
|
|
||||||
// send message to server
|
/* send message to server */
|
||||||
if (msgsnd(server_qid, &request, request_msg_size, 0) == -1) {
|
if (msgsnd(server_qid, &request, request_msg_size, 0) == -1) {
|
||||||
ERROR(" msgsnd failed");
|
ERROR(" msgsnd failed");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
return process_response(rx_qid, vecs, type, internal_server_qid);
|
return process_response(rx_qid, vecs, type, internal_server_qid);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -279,7 +275,6 @@ uint32_t psa_framework_version(void)
|
|||||||
|
|
||||||
psa_handle_t psa_connect(uint32_t sid, uint32_t minor_version)
|
psa_handle_t psa_connect(uint32_t sid, uint32_t minor_version)
|
||||||
{
|
{
|
||||||
|
|
||||||
int idx;
|
int idx;
|
||||||
psa_status_t ret;
|
psa_status_t ret;
|
||||||
char pathname[PATHNAMESIZE] = { 0 };
|
char pathname[PATHNAMESIZE] = { 0 };
|
||||||
@ -355,7 +350,6 @@ psa_status_t psa_call(psa_handle_t handle,
|
|||||||
psa_outvec *out_vec,
|
psa_outvec *out_vec,
|
||||||
size_t out_len)
|
size_t out_len)
|
||||||
{
|
{
|
||||||
|
|
||||||
handle_is_valid(handle);
|
handle_is_valid(handle);
|
||||||
|
|
||||||
if ((in_len + out_len) > PSA_MAX_IOVEC) {
|
if ((in_len + out_len) > PSA_MAX_IOVEC) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user