From cea748fec847408a591afd865db857a0cacbc422 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Wed, 22 Feb 2017 14:53:25 +0100 Subject: [PATCH 1/4] rc_input: do always show key-presses in console; ... by mistake removed in 828e1db714ca9640af9bd925300862490c2a1c96 Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/056b47c09b8794bbca1f00d62dc25d33808ade26 Author: vanhofen Date: 2017-02-22 (Wed, 22 Feb 2017) Origin message was: ------------------ - rc_input: do always show key-presses in console; ... by mistake removed in 828e1db714ca9640af9bd925300862490c2a1c96 --- src/driver/rcinput.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/driver/rcinput.cpp b/src/driver/rcinput.cpp index 1678addeb..8357f2355 100644 --- a/src/driver/rcinput.cpp +++ b/src/driver/rcinput.cpp @@ -1382,7 +1382,7 @@ void CRCInput::getMsg_us(neutrino_msg_t * msg, neutrino_msg_data_t * data, uint6 } uint32_t trkey = translate(ev.code); - d_printf("key: %04x value %d, translate: %04x -%s-\n", ev.code, ev.value, trkey, getKeyName(trkey).c_str()); + printf("key: %04x value %d, translate: %04x -%s-\n", ev.code, ev.value, trkey, getKeyName(trkey).c_str()); if (trkey == RC_nokey) continue; From fbec2ca24003cb7f76ef1f633e4b9bbe7a5a6197 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Wed, 22 Feb 2017 15:25:04 +0100 Subject: [PATCH 2/4] controlapi: fix perror message Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/7c2e25103f77d9480a2501612c498e7e8466be0d Author: vanhofen Date: 2017-02-22 (Wed, 22 Feb 2017) Origin message was: ------------------ - controlapi: fix perror message --- src/nhttpd/tuxboxapi/controlapi.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nhttpd/tuxboxapi/controlapi.cpp b/src/nhttpd/tuxboxapi/controlapi.cpp index a228f09b9..49f9bee1f 100644 --- a/src/nhttpd/tuxboxapi/controlapi.cpp +++ b/src/nhttpd/tuxboxapi/controlapi.cpp @@ -882,8 +882,8 @@ void CControlAPI::RCEmCGI(CyhookHandler *hh) #endif int evd = open(EVENTDEV, O_RDWR); if (evd < 0) { + perror("opening " EVENTDEV " failed"); hh->SendError(); - perror("opening event0 failed"); return; } if (rc_send(evd, sendcode, KEY_PRESSED) < 0) { @@ -894,8 +894,8 @@ void CControlAPI::RCEmCGI(CyhookHandler *hh) } if (rc_send(evd, sendcode, KEY_RELEASED) < 0) { perror("writing 'KEY_RELEASED' event failed"); - close(evd); hh->SendError(); + close(evd); return; } close(evd); From 10878bc6e8bbd0e2a87a6260ebf5581e40a78580 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Wed, 22 Feb 2017 15:25:04 +0100 Subject: [PATCH 3/4] rcsim: fix perror message Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/f0f7aec577044d9c8ac02c58ffe3a03ff666b2e9 Author: vanhofen Date: 2017-02-22 (Wed, 22 Feb 2017) Origin message was: ------------------ - rcsim: fix perror message --- src/rcsim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rcsim.c b/src/rcsim.c index 2ae56a39c..ccfdb6c59 100644 --- a/src/rcsim.c +++ b/src/rcsim.c @@ -219,7 +219,7 @@ int main (int argc, char **argv){ #if defined (EVENTDEV) evd=open (EVENTDEV,O_RDWR); if (evd<0){ - perror ("opening event0 failed"); + perror ("opening " EVENTDEV " failed"); return 1; } #else From daf29c0d9cd4a9edc480b383455808e67f2e7671 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Thu, 23 Feb 2017 12:13:49 +0100 Subject: [PATCH 4/4] neutrino.cpp: fix compiler warning; ... msg and data is type long unsigned int, so %lu seems the right format, but above %lX is used too and it works fine. So, what's the right one? Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/c4aaf7678cf6a02c24524f71fba7663602466f07 Author: vanhofen Date: 2017-02-23 (Thu, 23 Feb 2017) Origin message was: ------------------ - neutrino.cpp: fix compiler warning; ... msg and data is type long unsigned int, so %lu seems the right format, but above %lX is used too and it works fine. So, what's the right one? --- src/neutrino.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 1844b0276..57a0ca62c 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -3520,7 +3520,7 @@ int CNeutrinoApp::handleMsg(const neutrino_msg_t _msg, neutrino_msg_data_t data) return messages_return::handled; } if ((msg >= CRCInput::RC_WithData) && (msg < CRCInput::RC_WithData + 0x10000000)) { - INFO("###################################### DELETED msg %x data %x\n", msg, data); + INFO("###################################### DELETED msg %lX data %lX\n", msg, data); delete [] (unsigned char*) data; return messages_return::handled; }