Skip to content

Commit

Permalink
jclklib: Avoid notify client if ascapable is the same
Browse files Browse the repository at this point in the history
If the value of ascapable is same as previous, end the event handler.
This is to avoid unneccesary messages in message queue.

Signed-off-by: Song Yoong Siang <[email protected]>
  • Loading branch information
yoongsiang2 authored and JunAnnLaiIntel committed May 21, 2024
1 parent d540df4 commit b500ac5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions jclklib/proxy/connect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ void event_handle()
portState = pd->portState;
break;
case CMLDS_INFO_NP:
if (pe.asCapable == ((CMLDS_INFO_NP_t *)data)->as_capable) {
PrintDebug("Ignore unchanged asCapable");
return;
}
pe.asCapable = ((CMLDS_INFO_NP_t *)data)->as_capable;
//printf("asCapable = %d\n\n", pe.asCapable);
break;
Expand Down

0 comments on commit b500ac5

Please sign in to comment.