Skip to content

Commit

Permalink
Print warning if sending to cookie to TNCC script fails
Browse files Browse the repository at this point in the history
Coverity didn't like us just ignoring it.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
  • Loading branch information
dwmw2 committed Oct 10, 2019
1 parent 8ff6cc1 commit 9e0c764
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion auth-juniper.c
Expand Up @@ -313,7 +313,11 @@ static int check_cookie_success(struct openconnect_info *vpninfo)
buf_append(buf, "Cookie=%s\n", dspreauth);
if (buf_error(buf))
return buf_free(buf);
send(vpninfo->tncc_fd, buf->data, buf->pos, 0);
if (send(vpninfo->tncc_fd, buf->data, buf->pos, 0) < 0) {
vpn_progress(vpninfo, PRG_ERR,
_("Failed to send cookie to TNCC\n"));
/* Continue anyway */
}
buf_truncate(buf);
}

Expand Down

0 comments on commit 9e0c764

Please sign in to comment.