[cecd-devel] [PATCH 1/6] [cecd] answer to <Abort> opcode
Status: Beta
Brought to you by:
pbatard
|
From: Florian F. <f.f...@gm...> - 2011-12-30 14:11:46
|
Per specification it is mandatory to answer to an <Abort> message with a <Feature Abort> reply in case the initiator address is not broadcast. Any [Abort Reason] can be used. --- cecd/cecd.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/cecd/cecd.c b/cecd/cecd.c index 67c0a6c..48e62b0 100644 --- a/cecd/cecd.c +++ b/cecd/cecd.c @@ -962,6 +962,15 @@ int main(int argc, char** argv) } len = 0; break; + case CEC_OP_ABORT: + // Only answer to abort if initiator address is not broadcast + if ((buffer[0] & 0x0f) == 0x0f) + break; + buffer[1] = CEC_OP_FEATURE_ABORT; + buffer[2] = CEC_ABORT_REFUSED; + len = 3; + break; + default: // Convert to hash, to match against a conf file command cec_unprocessed[cec_unprocessed_len++] = htab_hash(buffer+1, len-1, htab_cec, 0); -- 1.7.5.4 |