repositories
/
deb_libcec.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1fc16cf
)
cec: exit cec-client after entering bootloader mode
author
Lars Op den Kamp
<lars@opdenkamp.eu>
Wed, 25 Jan 2012 11:12:19 +0000
(12:12 +0100)
committer
Lars Op den Kamp
<lars@opdenkamp.eu>
Wed, 25 Jan 2012 11:12:19 +0000
(12:12 +0100)
src/testclient/main.cpp
patch
|
blob
|
blame
|
history
diff --git
a/src/testclient/main.cpp
b/src/testclient/main.cpp
index 8178449cee36d7f805d7e4923b783ed404ec7852..162c1f17c4017fe61bfc64752ed9829a2f65c94d 100644
(file)
--- a/
src/testclient/main.cpp
+++ b/
src/testclient/main.cpp
@@
-57,6
+57,7
@@
uint8_t g_iHDMIPort(CEC_DEFAULT_HDMI_PORT);
cec_logical_address g_iBaseDevice((cec_logical_address)CEC_DEFAULT_BASE_DEVICE);
cec_device_type_list g_typeList;
bool g_bSingleCommand(false);
cec_logical_address g_iBaseDevice((cec_logical_address)CEC_DEFAULT_BASE_DEVICE);
cec_device_type_list g_typeList;
bool g_bSingleCommand(false);
+bool g_bExit(false);
CMutex g_outputMutex;
ICECCallbacks g_callbacks;
CMutex g_outputMutex;
ICECCallbacks g_callbacks;
@@
-534,7
+535,11
@@
bool ProcessCommandBL(ICECAdapter *parser, const string &command, string & UNUSE
{
if (command == "bl")
{
{
if (command == "bl")
{
- parser->StartBootloader();
+ if (parser->StartBootloader())
+ {
+ PrintToStdOut("entered bootloader mode. exiting cec-client");
+ g_bExit = true;
+ }
return true;
}
return true;
}
@@
-1089,22
+1094,21
@@
int main (int argc, char *argv[])
PrintToStdOut("waiting for input");
}
PrintToStdOut("waiting for input");
}
- bool bContinue(true);
- while (bContinue)
+ while (!g_bExit)
{
string input;
getline(cin, input);
cin.clear();
{
string input;
getline(cin, input);
cin.clear();
- if (ProcessConsoleCommand(parser, input) && !g_bSingleCommand)
+ if (ProcessConsoleCommand(parser, input) && !g_bSingleCommand
&& !g_bExit
)
{
if (!input.empty())
PrintToStdOut("waiting for input");
}
else
{
if (!input.empty())
PrintToStdOut("waiting for input");
}
else
-
bContinue = fals
e;
+
g_bExit = tru
e;
- if (
bContinue
)
+ if (
!g_bExit
)
CCondition::Sleep(50);
}
CCondition::Sleep(50);
}