repositories
/
deb_libcec.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed return value check of m_communication->Write()
[deb_libcec.git]
/
src
/
lib
/
CECParserC.cpp
diff --git
a/src/lib/CECParserC.cpp
b/src/lib/CECParserC.cpp
index a4841a0a69b0dec55860b17e65bd3e496338c6d3..7deb982920866b62f31428f71020c1bf2a1543bc 100644
(file)
--- a/
src/lib/CECParserC.cpp
+++ b/
src/lib/CECParserC.cpp
@@
-47,13
+47,6
@@
bool cec_init(const char *strDeviceName, cec_logical_address iLogicalAddress /*
return (cec_parser != NULL);
}
return (cec_parser != NULL);
}
-bool cec_close(void)
-{
- delete cec_parser;
- cec_parser = NULL;
- return true;
-}
-
bool cec_open(const char *strPort, int iTimeout)
{
if (cec_parser)
bool cec_open(const char *strPort, int iTimeout)
{
if (cec_parser)
@@
-61,6
+54,17
@@
bool cec_open(const char *strPort, int iTimeout)
return false;
}
return false;
}
+bool cec_close(int iTimeout)
+{
+ bool bReturn = false;
+ if (cec_parser)
+ bReturn = cec_parser->Close(iTimeout);
+
+ delete cec_parser;
+ cec_parser = NULL;
+ return bReturn;
+}
+
bool cec_ping(void)
{
if (cec_parser)
bool cec_ping(void)
{
if (cec_parser)
@@
-131,10
+135,10
@@
bool cec_get_next_command(cec_command *command)
return false;
}
return false;
}
-bool cec_transmit(const CEC::cec_frame &data, bool bWaitForAck /* = true */
, int64_t iTimeout /* = 2000 */
)
+bool cec_transmit(const CEC::cec_frame &data, bool bWaitForAck /* = true */)
{
if (cec_parser)
{
if (cec_parser)
- return cec_parser->Transmit(data, bWaitForAck
, iTimeout
);
+ return cec_parser->Transmit(data, bWaitForAck);
return false;
}
return false;
}