misc: life_mngr: use the entire read buffer for the SOS socket
The messages from the SOS socket can be safely read into the entire read buffer. Tracked-On: #5429 Signed-off-by: Peter Fang <peter.fang@intel.com> Acked-by: Wang, Yu1 <yu1.wang@intel.com>
This commit is contained in:
parent
830b7749de
commit
654d0f9d00
|
@ -179,10 +179,10 @@ void *sos_socket_thread(void *arg)
|
|||
}
|
||||
|
||||
while (1) {
|
||||
memset(buf, 0, BUFF_SIZE);
|
||||
memset(buf, 0, sizeof(buf));
|
||||
|
||||
/* Here assume the socket communication is reliable, no need to try */
|
||||
num = read(connect_fd, buf, sizeof(SHUTDOWN_CMD));
|
||||
num = read(connect_fd, buf, sizeof(buf));
|
||||
if (num == -1) {
|
||||
LOG_PRINTF("read error on a socket(fd = 0x%x)\n", connect_fd);
|
||||
close(connect_fd);
|
||||
|
|
Loading…
Reference in New Issue