From a882b074dc1f22747f2f4ff0197093ef127f205b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=96man?= Date: Fri, 17 Sep 2010 20:24:27 +0000 Subject: [PATCH] DVR: Show reason code on error --- src/streaming.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/streaming.c b/src/streaming.c index 21954474..0110cd00 100644 --- a/src/streaming.c +++ b/src/streaming.c @@ -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; } }