Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return AEE_ECONNREFUSED when Fastrpc device is not available #32

Merged
merged 1 commit into from
Aug 6, 2024
Merged
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
8 changes: 5 additions & 3 deletions src/fastrpc_apps_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ int fastrpc_session_open(int domain, int *dev) {
*dev = device;
return 0;
}
return AEE_EUNKNOWN;
return AEE_ECONNREFUSED;
}

int fastrpc_session_close(int domain, int dev) {
Expand Down Expand Up @@ -3214,7 +3214,9 @@ static int open_device_node(int domain_id) {
if (dev < 0)
FARF(ERROR,
"Error 0x%x: %s failed for domain ID %d, sess ID %d secure dev : %s, "
"dev : %s. (errno %d, %s)",
"dev : %s. (errno %d, %s) (Either the remote processor is down, or "
"application does not have permission to access the remote "
"processor\n",
nErr, __func__, domain_id, sess_id, get_secure_domain_name(domain),
get_domain_name(domain), errno, strerror(errno));
return dev;
Expand Down Expand Up @@ -3523,7 +3525,7 @@ static int remote_init(int domain) {
VERIFYC(pd_type > DEFAULT_UNUSED && pd_type < MAX_PD_TYPE, AEE_EBADITEM);
if (hlist[domain].dev == -1) {
dev = open_device_node(domain);
VERIFYM(dev >= 0, AEE_ERPC, "open dev failed\n");
VERIFYC(dev >= 0, AEE_ECONNREFUSED);
// Set session relation info using FASTRPC_INVOKE2_SESS_INFO
sess_info.domain_id = info;
sess_info.pd_type = pd_type;
Expand Down
Loading