[pulseaudio-discuss] [PATCH 3/3] echo-cancel-test: When fopen() fails tell which file failed

Stefan Huber s.huber at bct-electronic.com
Mon Feb 11 01:56:46 PST 2013


---
 src/modules/echo-cancel/module-echo-cancel.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/modules/echo-cancel/module-echo-cancel.c b/src/modules/echo-cancel/module-echo-cancel.c
index 748cd9c..8549b39 100644
--- a/src/modules/echo-cancel/module-echo-cancel.c
+++ b/src/modules/echo-cancel/module-echo-cancel.c
@@ -2088,17 +2088,17 @@ int main(int argc, char* argv[]) {
 
     u.captured_file = fopen(argv[2], "rb");
     if (u.captured_file == NULL) {
-        perror ("fopen failed");
+        perror ("Could not open capture file");
         goto fail;
     }
     u.played_file = fopen(argv[1], "rb");
     if (u.played_file == NULL) {
-        perror ("fopen failed");
+        perror ("Could not open play file");
         goto fail;
     }
     u.canceled_file = fopen(argv[3], "wb");
     if (u.canceled_file == NULL) {
-        perror ("fopen failed");
+        perror ("Could not open canceled file");
         goto fail;
     }
 
@@ -2141,7 +2141,7 @@ int main(int argc, char* argv[]) {
         u.drift_file = fopen(argv[5], "rt");
 
         if (u.drift_file == NULL) {
-            perror ("fopen failed");
+            perror ("Could not open drift file");
             goto fail;
         }
     }
-- 
1.7.9.5



More information about the pulseaudio-discuss mailing list