mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-27 07:22:57 +02:00
try to fix rc over webif on hd51
Origin commit data
------------------
Branch: ni/coolstream
Commit: a21fb645ac
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2018-01-22 (Mon, 22 Jan 2018)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -890,6 +890,17 @@ void CControlAPI::RebootCGI(CyhookHandler *hh)
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
void dev_uinput_sync(int fd) {
|
||||
struct input_event ev;
|
||||
|
||||
gettimeofday(&ev.time, NULL);
|
||||
ev.type = EV_SYN;
|
||||
ev.code = SYN_REPORT;
|
||||
ev.value = 0;
|
||||
write(fd, &ev, sizeof(ev));
|
||||
}
|
||||
|
||||
int CControlAPI::rc_send(int ev, unsigned int code, unsigned int value)
|
||||
{
|
||||
struct input_event iev;
|
||||
@@ -943,12 +954,14 @@ void CControlAPI::RCEmCGI(CyhookHandler *hh)
|
||||
close(evd);
|
||||
return;
|
||||
}
|
||||
dev_uinput_sync(evd);
|
||||
if (rc_send(evd, sendcode, KEY_RELEASED) < 0) {
|
||||
perror("writing 'KEY_RELEASED' event failed");
|
||||
hh->SendError();
|
||||
close(evd);
|
||||
return;
|
||||
}
|
||||
dev_uinput_sync(evd);
|
||||
close(evd);
|
||||
#else
|
||||
/* 0 == KEY_PRESSED in rcinput.cpp */
|
||||
|
Reference in New Issue
Block a user