Skip to content

Commit

Permalink
Resolved Unsigned-pd support issue
Browse files Browse the repository at this point in the history
Signed-off-by: Chanikya Prakash Gettiboina <[email protected]>
  • Loading branch information
Chanikya Prakash Gettiboina committed Jun 4, 2024
1 parent 088a459 commit 8f15e32
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion inc/fastrpc_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ int fastrpc_session_open(int domain, int *dev);
/**
* @brief closes the remote session/file descriptor of the fastrpc device node
*/
int fastrpc_session_close(int dev);
int fastrpc_session_close(int domain, int dev);
/**
* @brief increments the reference count of the domain
* used to identify whether there are any active remote calls for a specific domain
Expand Down
11 changes: 9 additions & 2 deletions src/fastrpc_apps_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,12 @@ void set_thread_context(int domain) {

int fastrpc_session_open(int domain, int *dev) {
int device = -1;

if(IS_SESSION_OPEN_ALREADY(domain)) {
*dev = hlist[domain].dev;
return 0;
}

device = open_device_node(domain);
if (device >= 0) {
*dev = device;
Expand All @@ -350,8 +356,9 @@ int fastrpc_session_open(int domain, int *dev) {
return AEE_EUNKNOWN;
}

int fastrpc_session_close(int dev) {
close(dev);
int fastrpc_session_close(int domain, int dev) {
if(hlist[domain].dev == -1)
close(dev);
return 0;
}

Expand Down
2 changes: 1 addition & 1 deletion src/fastrpc_cap.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ int fastrpc_get_cap(uint32_t domain, uint32_t attributeID, uint32_t *capability)

bail:
if(dev != -1)
fastrpc_session_close(dev);
fastrpc_session_close(dom, dev);
if (nErr) {
FARF(ERROR, "Warning 0x%x: %s failed to get attribute %u for domain %u (errno %s)", nErr, __func__, attributeID, domain, strerror(errno));
}
Expand Down

0 comments on commit 8f15e32

Please sign in to comment.