In r5294 a change was made to allow lcache_htable_fetch to return an additional code in the event of an error.
It returns -1 for error and 0 for not found. This is inconsistent with script functions should be returning and causes script to halt if a cache entry is not found.
Attached patch switches the values for error and notfound so the script doesn't exit incorrectly.
Patch to reverse not found and error retvals
Hi Phil,
Thank you for the report.
I have changed that when I introduced MI commands forgeting that the core function cache_fetch returns the code from "lcache_htable_fetch" function.
I have chosen to put -2 instead of 0 and not gone for your solution of putting 0 in case of error since I think it is better not to exit the script in any case.
regards,
Anca