capmt: fix endless loop
When tvh receives less then 4 bytes from the socket for some reason, it stuck in the endless loop in handle_single() calling: capmt_msg_size() capmt_analyze_cmd() The capmt thread eats 100% CPU and cannot be normally terminated because the capmt_msg_size() was constantly returning 0. The commit fixes the problem.
This commit is contained in:
parent
7414ebafe4
commit
ac3599bc79
1 changed files with 1 additions and 1 deletions
|
@ -1372,7 +1372,7 @@ handle_single(capmt_t *capmt)
|
|||
}
|
||||
if (adapter < MAX_CA) {
|
||||
cmd_size = capmt_msg_size(capmt, &buffer, offset);
|
||||
if (cmd_size >= 0)
|
||||
if (cmd_size > 0)
|
||||
break;
|
||||
}
|
||||
sbuf_cut(&buffer, 1);
|
||||
|
|
Loading…
Add table
Reference in a new issue