[DOMX]: Fix error handling in RPC_sendPacket_sync
authorVidhoon Viswanathan <vidhoon@ti.com>
Wed, 2 May 2012 11:59:13 +0000 (04:59 -0700)
committerBrijesh Nekkare <b-nekkare@ti.com>
Wed, 20 Jun 2012 07:24:32 +0000 (12:54 +0530)
commit854a8fb23aee9f53cf2107883e7f8b2b00f23945
tree731668ce48b0a9612a48aef04ccda61e64485472
parent0fd4a3e04b0fc58f851f952a39333a29a714fe8b
[DOMX]: Fix error handling in RPC_sendPacket_sync

Ducati faulty state is determined by the following
inference condition:
if(status<0 && errno==ENXIO)
{
//ducati in faulty state
}
After write call, errno was checked in wrong manner.
Also, write call returns number of bytes written.
This patch checks errno in case of write call failure
and detects faulty state of ducati. And it uses
status == nPacketSize as a tighter condition to validate
write call success.

Change-Id: I2062e128c4754b0faef2c33ca9465129105ade0c
Signed-off-by: Vidhoon Viswanathan <vidhoon@ti.com>
domx/omx_rpc/src/omx_rpc_stub.c