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:
7fac463
)
Removed unused local variables.
author
ueno
<ueno>
Fri, 11 Aug 2006 02:52:39 +0000
(
02:52
+0000)
committer
ueno
<ueno>
Fri, 11 Aug 2006 02:52:39 +0000
(
02:52
+0000)
starttls.c
patch
|
blob
|
history
diff --git
a/starttls.c
b/starttls.c
index
259960a
..
4159c5f
100644
(file)
--- a/
starttls.c
+++ b/
starttls.c
@@
-167,10
+167,10
@@
main (argc, argv)
{
int in = fileno (stdin), out = fileno (stdout),
nbuffer, wrote;
{
int in = fileno (stdin), out = fileno (stdout),
nbuffer, wrote;
- struct pollfd readfds[2], writefds[1];
- char buffer[BUFSIZ], *retry;
+ struct pollfd readfds[2];
+ char buffer[BUFSIZ];
struct sigaction act;
struct sigaction act;
- sigset_t orig_mask;
+ sigset_t mask, orig_mask;
int this_option_optind = optind ? optind : 1;
int option_index = 0, c;
int this_option_optind = optind ? optind : 1;
int option_index = 0, c;
@@
-225,21
+225,22
@@
main (argc, argv)
memset (&act, 0, sizeof (act));
act.sa_handler = do_tls_negotiate;
sigemptyset (&act.sa_mask);
memset (&act, 0, sizeof (act));
act.sa_handler = do_tls_negotiate;
sigemptyset (&act.sa_mask);
- sigaddset (&act.sa_mask, SIGALRM);
act.sa_flags = SA_RESTART|SA_RESETHAND;
sigaction (SIGALRM, &act, NULL);
act.sa_flags = SA_RESTART|SA_RESETHAND;
sigaction (SIGALRM, &act, NULL);
+ sigemptyset (&mask);
+ sigaddset (&mask, SIGALRM);
+
readfds[0].fd = in;
readfds[1].fd = tls_fd;
readfds[0].events = POLLIN;
readfds[1].events = POLLIN;
readfds[0].fd = in;
readfds[1].fd = tls_fd;
readfds[0].events = POLLIN;
readfds[1].events = POLLIN;
- writefds[0].events = POLLOUT;
while (1)
{
int ready;
while (1)
{
int ready;
- sigprocmask (SIG_SETMASK, &act.sa_mask, &orig_mask);
+ sigprocmask (SIG_SETMASK, &mask, &orig_mask);
ready = poll (readfds, 2, -1);
sigprocmask (SIG_SETMASK, &orig_mask, NULL);
if (ready == -1 && errno != EINTR)
ready = poll (readfds, 2, -1);
sigprocmask (SIG_SETMASK, &orig_mask, NULL);
if (ready == -1 && errno != EINTR)