changeset 434:264c5b900bfb src

Pass return value of vm_jump_up back to the caller. dvdnav_go_up ignores the return value of vm_jump_up, and always returns DVDNAV_STATUS_OK, the calling code cannot therefore determine whether the jump was successful or not. The attached patch evaluates the return value from vm_jump_up and passes this back to the caller. Patch by Richard Hulme.
author rathann
date Sun, 06 Oct 2013 21:56:26 +0000
parents 1c7c804e9c82
children 29d4a43c8c86
files navigation.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/navigation.c	Sun Oct 06 20:54:43 2013 +0000
+++ b/navigation.c	Sun Oct 06 21:56:26 2013 +0000
@@ -268,9 +268,11 @@
 
 dvdnav_status_t dvdnav_go_up(dvdnav_t *this) {
   /* A nice easy function... delegate to the VM */
+  int32_t retval;
+
   pthread_mutex_lock(&this->vm_lock);
-  vm_jump_up(this->vm);
+  retval = vm_jump_up(this->vm);
   pthread_mutex_unlock(&this->vm_lock);
 
-  return DVDNAV_STATUS_OK;
+  return retval ? DVDNAV_STATUS_OK : DVDNAV_STATUS_ERR;
 }