[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Ayttm-commits] CVS: ayttm/modules/msn2/libmsn2 msn_bittybits.C,1.4,1.5
From: |
Colin Leroy <address@hidden> |
Subject: |
[Ayttm-commits] CVS: ayttm/modules/msn2/libmsn2 msn_bittybits.C,1.4,1.5 |
Date: |
Wed, 15 Jan 2003 03:33:19 -0500 |
Update of /cvsroot/ayttm/ayttm/modules/msn2/libmsn2
In directory subversions:/tmp/cvs-serv28040/modules/msn2/libmsn2
Modified Files:
msn_bittybits.C
Log Message:
remove alarm() hack
Index: msn_bittybits.C
===================================================================
RCS file: /cvsroot/ayttm/ayttm/modules/msn2/libmsn2/msn_bittybits.C,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- msn_bittybits.C 14 Jan 2003 15:12:13 -0000 1.4
+++ msn_bittybits.C 15 Jan 2003 08:33:16 -0000 1.5
@@ -10,16 +10,6 @@
#include "msn_interface.h"
#include "msn_bittybits.h"
-#include <errno.h>
-#include <signal.h>
-#include <setjmp.h>
-
-static sigjmp_buf jmpenv;
-static void timeout_handler(int sig)
-{
- siglongjmp(jmpenv, 1);
-}
-
char ** msn_read_line(int sock, int * numargs)
{
// Right, this is quite a task. Step One is to read the thing in.
@@ -29,28 +19,12 @@
while(1)
{
- void (*prev_handler)(int);
-
- alarm(0);
- prev_handler = signal(SIGALRM, timeout_handler);
- if (sigsetjmp(jmpenv, 1)) {
- alarm(0);
- signal(SIGALRM, prev_handler);
- errno = ETIMEDOUT;
- printf("Timeout !!!!!!!!!\n");
- return NULL;
- }
- alarm(3);
-
if(read(sock, &c, 1)<1)
{
printf("What the..?!\n"); //DEBUG
return NULL;
}
- alarm(0);
- signal(SIGALRM, prev_handler);
-
if(pos == 1249) {buf[pos]='\0'; continue; }
if(c=='\r' || pos > 1249) { continue; }
if(c=='\n') { numspaces++; buf[pos]='\0'; break; }
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Ayttm-commits] CVS: ayttm/modules/msn2/libmsn2 msn_bittybits.C,1.4,1.5,
Colin Leroy <address@hidden> <=
- Prev by Date:
[Ayttm-commits] CVS: ayttm configure.in,1.110,1.111 ChangeLog,1.113,1.114
- Next by Date:
[Ayttm-commits] CVS: ayttm ChangeLog,1.114,1.115 configure.in,1.111,1.112
- Previous by thread:
[Ayttm-commits] CVS: ayttm configure.in,1.110,1.111 ChangeLog,1.113,1.114
- Next by thread:
[Ayttm-commits] CVS: ayttm ChangeLog,1.114,1.115 configure.in,1.111,1.112
- Index(es):