]> git.meshlink.io Git - utcp/commit - utcp.c
Don't call the poll callback unnecessarily.
authorGuus Sliepen <guus@sliepen.org>
Sun, 29 Mar 2020 14:21:51 +0000 (16:21 +0200)
committerGuus Sliepen <guus@sliepen.org>
Sun, 29 Mar 2020 14:21:51 +0000 (16:21 +0200)
commit97f8b67ac77d0623e536d302eb1e08666be7d411
treea537a99d553975c06cabc9a42db7471daf5d25bb
parentbf55733700d946f678947a6caaa782b56669a3f1
Don't call the poll callback unnecessarily.

Currently we call the poll callback if there is any free space in the send
buffer, every time we call utcp_timeout(). However, if the application
does not send anything inside the callback, then it most likely won't send
anything the next time if the free space in the send buffer did not change.
So only call the callback when more space has been made available in the
send buffer.
utcp.c
utcp_priv.h