mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-27 23:42:51 +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)
|
int CControlAPI::rc_send(int ev, unsigned int code, unsigned int value)
|
||||||
{
|
{
|
||||||
struct input_event iev;
|
struct input_event iev;
|
||||||
@@ -943,12 +954,14 @@ void CControlAPI::RCEmCGI(CyhookHandler *hh)
|
|||||||
close(evd);
|
close(evd);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
dev_uinput_sync(evd);
|
||||||
if (rc_send(evd, sendcode, KEY_RELEASED) < 0) {
|
if (rc_send(evd, sendcode, KEY_RELEASED) < 0) {
|
||||||
perror("writing 'KEY_RELEASED' event failed");
|
perror("writing 'KEY_RELEASED' event failed");
|
||||||
hh->SendError();
|
hh->SendError();
|
||||||
close(evd);
|
close(evd);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
dev_uinput_sync(evd);
|
||||||
close(evd);
|
close(evd);
|
||||||
#else
|
#else
|
||||||
/* 0 == KEY_PRESSED in rcinput.cpp */
|
/* 0 == KEY_PRESSED in rcinput.cpp */
|
||||||
|
Reference in New Issue
Block a user