setting a 1 second alarm and a 10 second select timeout is silly. #ifdef
out the alarm code, and just deal with select.
This commit is contained in:
parent
b04a332123
commit
ae867b0b4b
2 changed files with 53 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
|||
$NetBSD: distinfo,v 1.10 2006/05/10 20:16:40 christos Exp $
|
||||
$NetBSD: distinfo,v 1.11 2006/05/10 20:31:50 christos Exp $
|
||||
|
||||
SHA1 (i2cbd-2.0_BETA3.tar.gz) = 10f68eda9891d1f2e07de7e1f9de12b60e6862f0
|
||||
RMD160 (i2cbd-2.0_BETA3.tar.gz) = 25825fa0b22aa34764193c678269dd97e3daf032
|
||||
|
@ -10,3 +10,4 @@ SHA1 (patch-ad) = 4a5c9276b10905d7487e3191f5008fc9418743ae
|
|||
SHA1 (patch-af) = 7b5257dc24f0b34a3205bd1accd83a068210a5fc
|
||||
SHA1 (patch-ag) = b354e4ed7dce00e13f87579b252650d7b921b1aa
|
||||
SHA1 (patch-ah) = 94ee816e45d2f26e94a22678cc090fa4fb4f0daa
|
||||
SHA1 (patch-ai) = eaed09ca42829c3f6fb2724ef7eb12d16d8a0a91
|
||||
|
|
51
chat/i2cbd/patches/patch-ai
Normal file
51
chat/i2cbd/patches/patch-ai
Normal file
|
@ -0,0 +1,51 @@
|
|||
$NetBSD: patch-ai,v 1.1 2006/05/10 20:31:50 christos Exp $
|
||||
|
||||
--- src/serverserve.c.orig 2001-10-26 19:07:19.000000000 -0400
|
||||
+++ src/serverserve.c 2006-05-10 16:28:22.000000000 -0400
|
||||
@@ -19,7 +19,9 @@
|
||||
fd_set held_fdset;
|
||||
|
||||
void serverserve (void);
|
||||
+#ifdef USE_ALARM
|
||||
static void gotalarm (int);
|
||||
+#endif
|
||||
static void sdoinput (void);
|
||||
|
||||
void
|
||||
@@ -35,10 +37,13 @@
|
||||
for (i = 0; i < MAX_USERS+1; i++)
|
||||
cbufs[i].new = 1;
|
||||
|
||||
+#ifdef USE_ALARM
|
||||
signal(SIGALRM, gotalarm);
|
||||
+#endif
|
||||
timeisup = 0;
|
||||
|
||||
for (;;) {
|
||||
+#ifdef USE_ALARM
|
||||
if (polldelay) {
|
||||
if (setitimer(ITIMER_REAL, polldelay, 0) < 0) {
|
||||
perror("server: setitimer failed");
|
||||
@@ -46,6 +51,7 @@
|
||||
}
|
||||
timeisup = 0;
|
||||
}
|
||||
+#endif
|
||||
|
||||
memmove(&fdr, &fdset, sizeof(fdset));
|
||||
memmove(&efdr, &fdset, sizeof(fdset));
|
||||
@@ -85,12 +91,14 @@
|
||||
}
|
||||
}
|
||||
|
||||
+#ifdef USE_ALARM
|
||||
static void
|
||||
gotalarm(int n)
|
||||
{
|
||||
timeisup++;
|
||||
signal(n, gotalarm);
|
||||
}
|
||||
+#endif
|
||||
|
||||
static void
|
||||
sdoinput(void)
|
Loading…
Reference in a new issue