extern int tls_pending();
static char *opt_cert_file = NULL, *opt_key_file = NULL;
-static int tls_fd;
+static int tls_fd = -1;
static void
usage (progname)
static void
do_tls_negotiate(sig)
- int sig;
+ int sig;
{
- tls_negotiate(tls_fd, opt_cert_file, opt_key_file);
+ tls_negotiate (tls_fd, opt_cert_file, opt_key_file);
}
int
goto finish;
for (retry = buffer; nbuffer > 0; nbuffer -= wrote, retry += wrote)
{
- sigprocmask (SIG_SETMASK, &act.sa_mask, &orig_mask);
writefds[0].fd = tls_fd;
+ sigprocmask (SIG_SETMASK, &act.sa_mask, &orig_mask);
ready = poll (writefds, 1, -1);
sigprocmask (SIG_SETMASK, &orig_mask, NULL);
if (ready == -1 && errno != EINTR)
goto finish;
for (retry = buffer; nbuffer > 0; nbuffer -= wrote, retry += wrote)
{
- sigprocmask (SIG_SETMASK, &act.sa_mask, &orig_mask);
writefds[0].fd = out;
+ sigprocmask (SIG_SETMASK, &act.sa_mask, &orig_mask);
ready = poll (writefds, 1, -1);
sigprocmask (SIG_SETMASK, &orig_mask, NULL);
if (ready == -1 && errno != EINTR)