Commit df7c1a70 authored by Suman Anna's avatar Suman Anna Committed by Hari Kanigeri

SYSLINK: ipc - nameserver_get returns properly for nameserver_get_local

nameserver_get_local function has been modified in a recent patch to
return a positive value if it finds a match. The nameserver_get function
internally calls both nameserver_get_local and nameserver_remote_get.
The function is now patched so that it returns properly if the name is present
locally by comparing against a positive value for the return value from
nameserver_get_local, and against zero for nameserver_remote_get.
Signed-off-by: default avatarSuman Anna <s-anna@ti.com>
parent 86142733
...@@ -817,7 +817,7 @@ int nameserver_get(void *handle, const char *name, ...@@ -817,7 +817,7 @@ int nameserver_get(void *handle, const char *name,
if (proc_id == NULL) { if (proc_id == NULL) {
retval = nameserver_get_local(temp_obj, name, retval = nameserver_get_local(temp_obj, name,
buffer, length); buffer, length);
if (retval == 0) /* Got the value */ if (retval > 0) /* Got the value */
goto exit; goto exit;
for (i = 0; i < max_proc_id; i++) { for (i = 0; i < max_proc_id; i++) {
...@@ -841,7 +841,7 @@ int nameserver_get(void *handle, const char *name, ...@@ -841,7 +841,7 @@ int nameserver_get(void *handle, const char *name,
if (i == local_proc_id) { if (i == local_proc_id) {
retval = nameserver_get_local(temp_obj, retval = nameserver_get_local(temp_obj,
name, buffer, length); name, buffer, length);
if (retval == 0) if (retval > 0)
break; break;
} else { } else {
...@@ -854,7 +854,7 @@ int nameserver_get(void *handle, const char *name, ...@@ -854,7 +854,7 @@ int nameserver_get(void *handle, const char *name,
} }
exit: exit:
printk(KERN_ERR "nameserver_get_local failed status:%x \n", retval); printk(KERN_ERR "nameserver_get status:%x \n", retval);
return retval; return retval;
} }
EXPORT_SYMBOL(nameserver_get); EXPORT_SYMBOL(nameserver_get);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment