aboutsummaryrefslogtreecommitdiff
path: root/nDPIsrvd.c
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2023-11-06 23:49:51 +0100
committerToni Uhlig <matzeton@googlemail.com>2023-11-07 00:02:36 +0100
commit5d56288a113aa3aa2e68dbf54f0acde0650bafcb (patch)
treebc4e9904feac2a8c9e5f5287774416b1aa3822f9 /nDPIsrvd.c
parent84b12cd02c1f11d134f00b0a066414a677a53719 (diff)
Fixed more SonarCloud complaints.
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'nDPIsrvd.c')
-rw-r--r--nDPIsrvd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/nDPIsrvd.c b/nDPIsrvd.c
index 37034751f..cb4c08a45 100644
--- a/nDPIsrvd.c
+++ b/nDPIsrvd.c
@@ -384,6 +384,7 @@ static int drain_write_buffers(struct remote_desc * const remote)
while ((written = write(remote->fd, buf->buf.ptr.raw + buf->written, buf->buf.used - buf->written)) < 0 &&
errno == EINTR)
{
+ // Retry if interrupted by a signal.
}
switch (written)
{
@@ -447,7 +448,7 @@ static int handle_outgoing_data(struct nio * const io, struct remote_desc * cons
}
if (utarray_len(additional_write_buffers) == 0)
{
- struct nDPIsrvd_write_buffer * const write_buffer = get_write_buffer(remote);
+ struct nDPIsrvd_write_buffer const * const write_buffer = get_write_buffer(remote);
if (write_buffer->buf.used == 0)
{
@@ -1261,6 +1262,7 @@ static int handle_incoming_data(struct nio * const io, struct remote_desc * cons
json_read_buffer->buf.max - json_read_buffer->buf.used)) < 0 &&
errno == EINTR)
{
+ // Retry if interrupted by a signal.
}
if (bytes_read < 0 || errno != 0)
{