]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
DVR: Show reason code on error
authorAndreas Öman <andreas@lonelycoder.com>
Fri, 17 Sep 2010 20:24:27 +0000 (20:24 +0000)
committerAndreas Öman <andreas@lonelycoder.com>
Fri, 17 Sep 2010 20:24:27 +0000 (20:24 +0000)
src/streaming.c

index 21954474927b24180a616ee7fafaa796b33ee3c1..0110cd00427dd8547f58c6e5916d8a573128ac29 100644 (file)
@@ -327,6 +327,8 @@ streaming_queue_clear(struct streaming_message_queue *q)
 const char *
 streaming_code2txt(int code)
 {
+  static __thread char ret[64];
+
   switch(code) {
   case SM_CODE_OK: return "OK";
     
@@ -367,7 +369,8 @@ streaming_code2txt(int code)
     return "No input detected";
 
   default:
-    return "Unknown reason";
+    snprintf(ret, sizeof(ret), "Unknown reason (%i)", code);
+    return ret;
   }
 }