From: Andreas Ă–man Date: Fri, 17 Sep 2010 20:24:27 +0000 (+0000) Subject: DVR: Show reason code on error X-Git-Tag: 2.12~44 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a882b074dc1f22747f2f4ff0197093ef127f205b;p=thirdparty%2Ftvheadend.git DVR: Show reason code on error --- diff --git a/src/streaming.c b/src/streaming.c index 219544749..0110cd004 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; } }