projects
/
elisp
/
starttls.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
23e92a4
)
Place sigprocmask just before poll.
author
ueno
<ueno>
Thu, 10 Aug 2006 23:41:47 +0000
(23:41 +0000)
committer
ueno
<ueno>
Thu, 10 Aug 2006 23:41:47 +0000
(23:41 +0000)
starttls.c
patch
|
blob
|
history
diff --git
a/starttls.c
b/starttls.c
index
34a74eb
..
604ab46
100644
(file)
--- a/
starttls.c
+++ b/
starttls.c
@@
-57,7
+57,7
@@
extern int tls_read(int, char *, int);
extern int tls_pending();
static char *opt_cert_file = NULL, *opt_key_file = NULL;
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
usage (progname)
@@
-77,9
+77,9
@@
usage (progname)
static void
do_tls_negotiate(sig)
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
}
int
@@
-204,8
+204,8
@@
main (argc, argv)
goto finish;
for (retry = buffer; nbuffer > 0; nbuffer -= wrote, retry += wrote)
{
goto finish;
for (retry = buffer; nbuffer > 0; nbuffer -= wrote, retry += wrote)
{
- sigprocmask (SIG_SETMASK, &act.sa_mask, &orig_mask);
writefds[0].fd = tls_fd;
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)
ready = poll (writefds, 1, -1);
sigprocmask (SIG_SETMASK, &orig_mask, NULL);
if (ready == -1 && errno != EINTR)
@@
-225,8
+225,8
@@
readtop:
goto finish;
for (retry = buffer; nbuffer > 0; nbuffer -= wrote, retry += wrote)
{
goto finish;
for (retry = buffer; nbuffer > 0; nbuffer -= wrote, retry += wrote)
{
- sigprocmask (SIG_SETMASK, &act.sa_mask, &orig_mask);
writefds[0].fd = out;
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)
ready = poll (writefds, 1, -1);
sigprocmask (SIG_SETMASK, &orig_mask, NULL);
if (ready == -1 && errno != EINTR)