]> git.vomp.tv Git - vompclient.git/commitdiff
Fix for negatives in getSimpleReply
authorChris Tallon <chris@vomp.tv>
Sun, 14 Aug 2005 16:11:22 +0000 (16:11 +0000)
committerChris Tallon <chris@vomp.tv>
Sun, 14 Aug 2005 16:11:22 +0000 (16:11 +0000)
vdr.cc

diff --git a/vdr.cc b/vdr.cc
index e1c69891c84f87255d1b65489f41552321a9a543..d951f45b725b81de50abf7a8caeae24fd5ab82f1 100644 (file)
--- a/vdr.cc
+++ b/vdr.cc
@@ -349,6 +349,7 @@ int VDR::deleteRecording(char* fileName)
   }
 
   int toReturn = getSimpleReply();
+  if (toReturn == -1) toReturn = 0; // error is same as 0=bad in this case
   pthread_mutex_unlock(&mutex);
   return toReturn;
 }
@@ -454,6 +455,7 @@ int VDR::streamChannel(ULONG number)
   }
 
   int toReturn = getSimpleReply();
+  if (toReturn == -1) toReturn = 0; // change error to bad
   pthread_mutex_unlock(&mutex);
   return toReturn;
 }
@@ -475,6 +477,7 @@ int VDR::stopStreaming()
   }
 
   int toReturn = getSimpleReply();
+  if (toReturn == -1) toReturn = 0; // change error to bad
   pthread_mutex_unlock(&mutex);
   return toReturn;
 }
@@ -643,6 +646,7 @@ int VDR::configSave(char* section, char* key, char* value)
   }
 
   int toReturn = getSimpleReply();
+  if (toReturn == -1) toReturn = 0; // change error to bad
   pthread_mutex_unlock(&mutex);
   return toReturn;
 }