OSDN Git Service

android/hal: Fix receiving of commands with no response parameter
authorSzymon Janc <szymon.janc@tieto.com>
Tue, 22 Oct 2013 12:03:58 +0000 (14:03 +0200)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Tue, 22 Oct 2013 12:10:15 +0000 (15:10 +0300)
This fix receiving of error response in case command has no reply
parameters.

android/hal-ipc.c

index 8d40271..9aac9c0 100644 (file)
@@ -153,6 +153,7 @@ int hal_ipc_cmd(uint8_t service_id, uint8_t opcode, uint16_t len, void *param,
 
        if (!rsp || rsp_len == 0) {
                memset(&err, 0, sizeof(err));
+               rsp_len = sizeof(err);
                rsp = &err;
        }